Add parameter type checks to printf style functions
gcc supports type checks for printf parameters which can catch some hard to reproduce bugs. Possible bugs happen when the parameter value is intepreted differently to the variable value. Example warnings follow ../library/LuaWrapper.cpp:1011:86: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=] ../plugins/follow.cpp:159:35: warning: format not a string literal and no format arguments [-Wformat-security]develop
parent
8717144f14
commit
8484b5dc8a
Loading…
Reference in New Issue