Closed nlgranger closed 4 years ago
Hello @nlgranger ,
Thanks for the report, another gcc-9 over-the-top static analyzer I forgot to make. I fixed it in the last commit.
Concerning the other topic, I would agree with you but I find it safer to let these flags in the cmake file, therefore travis ci ou github ci can insult me when I forgot some best practices.
Also, in Debian distribution for example, all the -W
flags are enabled by default when you build the package, so to avoid patching the upstream source code too often, I prefer being safe and let the compiler be strict.
GCC9 raises a warning for an maybe uninitialized variable in r_jws_serialize (src/jws.c:268). The if/else branches are missing a default or adj is missing an initial value.
On a related topic, I'm not sure adjusting CFLAGS in the cmake scripts is idiomatic anymore, even to add
-Wall -Werror
flags (for example or this), though I don't have an opinion on that myself tbh.