diff options
author | Taylor Yu <catalyst@torproject.org> | 2018-07-26 12:32:34 -0500 |
---|---|---|
committer | Taylor Yu <catalyst@torproject.org> | 2018-07-26 12:32:34 -0500 |
commit | a8bdb851eb23b6067e24ad955bb8f499b8348b95 (patch) | |
tree | f89a10d107486332c54dfe2a08376e7f93c24da9 /src | |
parent | be3a962ca7c6fc5fd72dfd9bb1def24efa4cdf2a (diff) | |
download | tor-a8bdb851eb23b6067e24ad955bb8f499b8348b95.tar.gz tor-a8bdb851eb23b6067e24ad955bb8f499b8348b95.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compress_zstd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/compress_zstd.c b/src/common/compress_zstd.c index baa7749f0a..1a7d21d486 100644 --- a/src/common/compress_zstd.c +++ b/src/common/compress_zstd.c @@ -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; |