diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-30 08:17:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-30 08:17:24 -0400 |
commit | 15d7f24c57828b94596ccfd97081840b920c2336 (patch) | |
tree | 044c018871e0abfc7a061ea31ca73c0372b8ccc0 | |
parent | dbf57ecf39e3066b567c5aade9e8b5575e1e1ec0 (diff) | |
parent | a8bdb851eb23b6067e24ad955bb8f499b8348b95 (diff) | |
download | tor-15d7f24c57828b94596ccfd97081840b920c2336.tar.gz tor-15d7f24c57828b94596ccfd97081840b920c2336.zip |
Merge branch 'maint-0.3.2' into maint-0.3.3
-rw-r--r-- | changes/bug26785 | 4 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/common/compress_zstd.c | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/changes/bug26785 b/changes/bug26785 new file mode 100644 index 0000000000..e6392fcbdd --- /dev/null +++ b/changes/bug26785 @@ -0,0 +1,4 @@ + o Minor bugfixes (compilation, portability): + - Don't try to use a pragma to temporarily disable + -Wunused-const-variable if the compiler doesn't support it. + Fixes bug 26785; bugfix on 0.3.2.11. diff --git a/configure.ac b/configure.ac index 2fda2ef6f3..d65f2fcd55 100644 --- a/configure.ac +++ b/configure.ac @@ -2172,6 +2172,9 @@ dnl -Wthread-safety-precise if test "$tor_cv_cflags__Woverlength_strings" = "yes"; then AC_DEFINE([HAVE_CFLAG_WOVERLENGTH_STRINGS], 1, [True if we have -Woverlength-strings]) fi + if test "$tor_cv_cflags__warn_unused_const_variable_2" = "yes"; then + AC_DEFINE([HAVE_CFLAG_WUNUSED_CONST_VARIABLE], 1, [True if we have -Wunused-const-variable]) + fi if test "x$enable_fatal_warnings" = "xyes"; then # I'd like to use TOR_CHECK_CFLAGS here, but I can't, since the diff --git a/src/common/compress_zstd.c b/src/common/compress_zstd.c index 193a0289f0..b9f9f1f076 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; |