From: Nick Mathewson Date: Mon, 30 May 2016 16:28:55 +0000 (-0400) Subject: Add -Wunused-const-variable=2 on GCC >=6.1 X-Git-Tag: tor-0.2.9.1-alpha~183^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ff20c93a5ec753a0c46ca5ecd991b8e2020f7d0;p=thirdparty%2Ftor.git Add -Wunused-const-variable=2 on GCC >=6.1 This caused a trivial warning in curve25519-donna-64bit.h, which had two unused constants. I commented them out. --- diff --git a/configure.ac b/configure.ac index d9149e26ec..f66d798713 100644 --- a/configure.ac +++ b/configure.ac @@ -1778,6 +1778,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ CFLAGS="$CFLAGS -Wignored-attributes -Wshift-negative-value -Wshift-overflow=2" CFLAGS="$CFLAGS -Wnull-dereference" CFLAGS="$CFLAGS -Wduplicated-cond" + CFLAGS="$CFLAGS -Wunused-const-variable=2" fi if test "x$have_shorten64_flag" = "xyes"; then diff --git a/src/ext/ed25519/donna/curve25519-donna-64bit.h b/src/ext/ed25519/donna/curve25519-donna-64bit.h index 2941d1bcdc..50c9916768 100644 --- a/src/ext/ed25519/donna/curve25519-donna-64bit.h +++ b/src/ext/ed25519/donna/curve25519-donna-64bit.h @@ -8,9 +8,9 @@ typedef uint64_t bignum25519[5]; -static const uint64_t reduce_mask_40 = ((uint64_t)1 << 40) - 1; +//static const uint64_t reduce_mask_40 = ((uint64_t)1 << 40) - 1; static const uint64_t reduce_mask_51 = ((uint64_t)1 << 51) - 1; -static const uint64_t reduce_mask_56 = ((uint64_t)1 << 56) - 1; +//static const uint64_t reduce_mask_56 = ((uint64_t)1 << 56) - 1; /* out = in */ DONNA_INLINE static void