-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update htscodecs and add more warnings #1828
Conversation
These find an old bug-let in hts_parse_format(): The buffer size is 8, but it includes \0 so the string would have been truncated, causing the strcmp to fail for "fastq.gz". Curiously gcc 10 and 11 spot this, but not gcc 12 or 13, nor clang. Some builds didn't have -Werror enabled, such as those without ./configure and on Windows.
test/test-bcf-sr.c
Outdated
@@ -179,6 +179,7 @@ int main(int argc, char *argv[]) | |||
break; | |||
case 'h': | |||
usage(EXIT_SUCCESS); | |||
// fall-through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really a fall-through situation. usage()
(and error()
) wants HTS_NORETURN
.
Change hts_close() to hts_close_abruptly() in bgzip, to fix an empty body warning, allowing removal of -Wno-empty-body in CI tests. Fix signed compare in htslib/bgzf.h, which caused a warning in the maintainer-check usepublic.cpp check. It appears that -Wall does not allow signed-compare in c++. Make CFLAGS settings more consistent in .cirrus.yml, and ensure $MAKE_OPTS is consistently applied in all make invocations. The latter is necessary because "make cc-version" and "make maintainer-check" can trigger production of some .mk files, and we want them to be made in the same way as if we ran the full build. Switch MacOS build to Sonoma as Ventura is no longer supported by Cirrus.
Hat-tip to John Marshall
It's already in $(LIBS) and the MacOS linker complains if it appears more than once
I've pushed a few adjustments:
Additionally, the MacOS builds were getting a banner saying "Only ghcr.io/cirruslabs/macos-runner:sonoma is allowed. Automatically upgraded." so the MacOS image has been changed to the Sonoma one. |
The extra warnings do spot a few buglets, such as in hts_parse_format().
Also resurrect
-Werror
which was absent from some builds. (It's still absent from the configure-less macos builds, but the recommended configure route has it which is sufficient.)