In my search for a free warning app, I started using -Werror so gcc treats all warnings as errors.
This is really very useful, because sometimes I missed one or two (serious) warnings in a large build release. Unfortunately, my project uses sqlite3, which contains many warnings that, as indicated on the sqlite website, cannot be fixed (they do not want to delete).
I was wondering if there is a way to use some # pragma that I can put in the sqlite3.c file to tell gcc to stop treating warnings as an error only for this file.
I tried:
#pragma GCC diagnostic ignored "-Werror"
without success I also tried to list one after the other warnings that cause problems with:
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wfloat-equal" #pragma GCC diagnostic ignored "-Wundef" ...
... Unfortunately, there are some warnings that cannot be completely disabled (i.e., initialization discards qualifiers from the target pointer type).
Any idea / suggestions?
source share