Skip to content

Fix compiler warnings - #3

Closed
dbolser wants to merge 2 commits into
mainfrom
mmbrej-codex/fix-compiler-warnings-and-update-agents.md
Closed

Fix compiler warnings#3
dbolser wants to merge 2 commits into
mainfrom
mmbrej-codex/fix-compiler-warnings-and-update-agents.md

Conversation

@dbolser

@dbolser dbolser commented Jul 29, 2025

Copy link
Copy Markdown
Owner

Summary

  • fix sign-compare warnings in probability data parsing
  • avoid sign mismatch in View
  • use size_t for valueSize
  • catch BGenError by reference
  • document build/test steps in AGENTS.md

Testing

  • ./waf configure
  • ./waf
  • ./build/test/unit/test_bgen
  • ./build/apps/bgenix -g example/example.16bits.bgen -list

https://chatgpt.com/codex/tasks/task_e_6888ce12e88c832786dcaec3bab9021f

@dbolser dbolser mentioned this pull request Jul 30, 2026
@dbolser

dbolser commented Jul 30, 2026

Copy link
Copy Markdown
Owner Author

Closing this and its duplicate #2 for now, but recording what is on the branch, because it is worth reviving rather than losing.

A clean build of main (GCC 13.3, -Wall -pedantic) emits 45 warnings, 23 of them in code we own:

file warnings
genfile/include/genfile/bgen/bgen.hpp 18 sign-compare
test/unit/test_variant_data_block.cpp 3 catch-value
src/View.cpp 1 sign-compare
apps/bgenix.cpp 1 sign-compare

This branch fixes every one of them, and the remaining 22 are boost, sqlite3 and zstd, which the -w hunks here silence. None of it has landed on main.

Notes for whoever picks it up:

  • The hunks are indented with spaces in tab-indented files, so they read as whole-line rewrites rather than the small changes they are. Worth re-indenting before landing, as we did with the streampos fix.
  • The bgen.hpp change touches the phased-parsing path in the public header. static_cast< uint32_t >( pack.numberOfAlleles ) - 1u makes explicit what the usual arithmetic conversions were already doing, so it is a warning fix rather than a behaviour change — but it deserves a careful look and a test run, since it is the one hunk in the core library.
  • -w on the vendored wscripts is blunt, but defensible for code we do not maintain. It also silences sqlite3's known-benign -Wreturn-local-addr in sqlite3SelectNew.
  • AGENTS.md predates the Python packaging and pytest suite, so it needs updating rather than restoring as-is.

@dbolser dbolser closed this Jul 30, 2026
@dbolser
dbolser deleted the mmbrej-codex/fix-compiler-warnings-and-update-agents.md branch July 30, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant