3 ms·
Make a warnpush.h file where you use compiler pragmas to suppress warnings and then make a warnpop.h file to restore. Then you do #include "warnpush.h" #i
by ensiferum 9y ago
Make a warnpush.h file where you use compiler pragmas to suppress warnings and then make a warnpop.h file to restore. Then you do
#include "warnpush.h"
#include <crappy.h>
#include "warnpop.h"
I always do this for third party headers in my projects. Except for std headers.
Example:
https://github.com/ensisoft/newsflash-plus/blob/master/app/commands.h#L25 https://github.com/ensisoft/newsflash-plus/blob/master/app/c...
- jcoffland 9y agoHere's what's in warnpush.h: https://github.com/ensisoft/newsflash-plus/blob/master/newsflash/warnpush.h https://github.com/ensisoft/newsflash-plus/blob/master/newsf...
- ansgri 9y agoHeh, an analogous file in my colleagues' project is 250 non-emply LOC. It seems to list every warning for GCC from 4.8 to 6.X. Sorry, not open source (yet?).