Don't disable an unsupported compiler warning

Conditionalize the pragma that temporarily disables
-Wunused-const-variable.  Some versions of gcc don't support it.  We
need to do this because of an apparent bug in some libzstd headers.
Fixes bug 26785; bugfix on 0.3.2.11.
This commit is contained in:
Taylor Yu
2018-07-26 12:32:34 -05:00
parent be3a962ca7
commit a8bdb851eb
3 changed files with 11 additions and 0 deletions
+4
View File
@@ -19,10 +19,14 @@
#include "compress_zstd.h"
#ifdef HAVE_ZSTD
#ifdef HAVE_CFLAG_WUNUSED_CONST_VARIABLE
DISABLE_GCC_WARNING(unused-const-variable)
#endif
#include <zstd.h>
#ifdef HAVE_CFLAG_WUNUSED_CONST_VARIABLE
ENABLE_GCC_WARNING(unused-const-variable)
#endif
#endif
/** Total number of bytes allocated for Zstandard state. */
static atomic_counter_t total_zstd_allocation;