diff options
-rw-r--r-- | mpi/mpi-internal.h | 3 | ||||
-rw-r--r-- | mpi/mpih-div.c | 4 | ||||
-rw-r--r-- | src/g10lib.h | 7 |
3 files changed, 11 insertions, 3 deletions
diff --git a/mpi/mpi-internal.h b/mpi/mpi-internal.h index e75b7c6d..178378fe 100644 --- a/mpi/mpi-internal.h +++ b/mpi/mpi-internal.h @@ -145,7 +145,8 @@ typedef int mpi_size_t; /* (must be a signed type) */ */ #define UDIV_QRNND_PREINV(q, r, nh, nl, d, di) \ do { \ - mpi_limb_t _q, _ql, _r; \ + mpi_limb_t _ql GCC_ATTR_UNUSED; \ + mpi_limb_t _q, _r; \ mpi_limb_t _xh, _xl; \ umul_ppmm (_q, _ql, (nh), (di)); \ _q += (nh); /* DI is 2**BITS_PER_MPI_LIMB too small */ \ diff --git a/mpi/mpih-div.c b/mpi/mpih-div.c index b33dcbfa..0bddd22e 100644 --- a/mpi/mpih-div.c +++ b/mpi/mpih-div.c @@ -48,7 +48,7 @@ _gcry_mpih_mod_1(mpi_ptr_t dividend_ptr, mpi_size_t dividend_size, { mpi_size_t i; mpi_limb_t n1, n0, r; - int dummy; + int dummy GCC_ATTR_UNUSED; /* Botch: Should this be handled at all? Rely on callers? */ if( !dividend_size ) @@ -396,7 +396,7 @@ _gcry_mpih_divmod_1( mpi_ptr_t quot_ptr, { mpi_size_t i; mpi_limb_t n1, n0, r; - int dummy; + int dummy GCC_ATTR_UNUSED; if( !dividend_size ) return 0; diff --git a/src/g10lib.h b/src/g10lib.h index 31131a54..2d84dd3a 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -67,6 +67,13 @@ #endif +#if __GNUC__ > 2 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 ) +#define GCC_ATTR_UNUSED __attribute__ ((unused)) +#else +#define GCC_ATTR_UNUSED +#endif + + /* Gettext macros. */ #define _(a) _gcry_gettext(a) |