Add some more #pragma's for GCC to ignore warnings

This commit is contained in:
Nigel Tao committed 2021-04-02 19:21:54 +11:00
1 parent 9b5d9b46ae
commit 97e30c29da
4 files changed
+21 -27

No files matched your search

+9 -6
View File
@@ -167,17 +167,20 @@ const grSingleFileGuidance = `
const grPragmaPush = `
// Wuffs' C code is generated automatically, not hand-written. These warnings'
// costs outweigh the benefits.
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
#pragma clang diagnostic ignored "-Wunused-function"
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunreachable-code"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
`
const grPragmaPop = `
#ifdef __clang__
#pragma clang diagnostic pop
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
`