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

+10 -13
View File
@@ -10,10 +10,13 @@
// 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
// Copyright 2017 The Wuffs Authors.
@@ -216,18 +219,12 @@ wuffs_base__cpu_arch__have_x86_sse42() {
// Wuffs assumes that:
// - converting a uint32_t to a size_t will never overflow.
// - converting a size_t to a uint64_t will never overflow.
#ifdef __WORDSIZE
#if defined(__WORDSIZE)
#if (__WORDSIZE != 32) && (__WORDSIZE != 64)
#error "Wuffs requires a word size of either 32 or 64 bits"
#endif
#endif
#if defined(__clang__)
#define WUFFS_BASE__POTENTIALLY_UNUSED_FIELD __attribute__((unused))
#else
#define WUFFS_BASE__POTENTIALLY_UNUSED_FIELD
#endif
// Clang also defines "__GNUC__".
#if defined(__GNUC__)
#define WUFFS_BASE__POTENTIALLY_UNUSED __attribute__((unused))
@@ -39812,8 +39809,8 @@ done:
#endif // WUFFS_IMPLEMENTATION
#ifdef __clang__
#pragma clang diagnostic pop
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif // WUFFS_INCLUDE_GUARD