Open nemequ opened 3 years ago
Hi Evan,
all these warnings are coming from the clone of the htslib, so it's not actually my code. :) Granted, this is a very old version of htslib, and I am long overdue switching to the latest htslib releases.
Cheers Alex
Some of these look legit, some may arguably be false positives.
I also see some assignments inside of
assert()
calls in the diagnostics (there may be more in the code), which is generally considered to be a bad practice since that code will just go away if someone building it definesNDEBUG
.These are just with
-Wall
on GCC 10.2; you can probably find a lot more with -Wextra, -fanalyzer, and the occasional runs with -fsanitize=address,undefined. Also, clang generally has better diagnostics than GCC these days, plus they have scan-build. If your code builds on MSVC /W4 and /analyze are excellent, and of course Coverity Scan is free for open source and fantastic.