I’d like to enable -Wconversion for the modules I’m making, but if I enable it with FLAGS +=, it also write all the Rack included files warnings (which are a huge list, hard to discriminate my part of code).
Is there a way to isolate these warnings only for my files?
Not with the command line, since
#include simply inserts source code so there’s no way for the command line to distinguish between Rack’s code and your code. You can add something like this to the top of your code, after includes.
#pragma GCC diagnostic "-Wconversion"
It works well, using
#pragma GCC diagnostic warning "-Wconversion" (you miss that keyword).