Fix (deliberately) unused variable warning in rsa-ltm.c
Seen on Ubuntu 18.04 with gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) giving: rsa-ltm.c: In function ‘ltm_rsa_private_calculate’: rsa-ltm.c:135:9: error: variable ‘where’ set but not used [-Werror=unused-but-set-variable] int where = 0; /* Ignore the set-but-unused warning from this */ ^~~~~ rsa-ltm.c: In function ‘gen_p’: rsa-ltm.c:482:9: error: variable ‘where’ set but not used [-Werror=unused-but-set-variable] int where = 0; /* Ignore the set-but-unused warning from this */ ^~~~~ Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:

committed by
Jeffrey Altman

parent
261015c918
commit
9ffbc17a0f
@@ -44,7 +44,7 @@ install:
|
|||||||
else
|
else
|
||||||
# This list of -Wno-error options should be reduced over time where possible
|
# This list of -Wno-error options should be reduced over time where possible
|
||||||
if [ x"$TRAVIS_COMPILER" != x"clang" ]; then
|
if [ x"$TRAVIS_COMPILER" != x"clang" ]; then
|
||||||
CFLAGS="-Wno-error=empty-body -Wno-error=shadow -Wno-error=unused-value -Wno-error=unused-but-set-variable -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" ../configure --enable-developer --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE
|
CFLAGS="-Wno-error=empty-body -Wno-error=shadow -Wno-error=unused-value -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" ../configure --enable-developer --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE
|
||||||
else
|
else
|
||||||
CFLAGS="-Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" ../configure --enable-developer --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE
|
CFLAGS="-Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" ../configure --enable-developer --srcdir=`dirname "$PWD"` --enable-maintainer-mode $COVERAGE
|
||||||
fi
|
fi
|
||||||
|
@@ -132,7 +132,7 @@ ltm_rsa_private_calculate(mp_int * in, mp_int * p, mp_int * q,
|
|||||||
{
|
{
|
||||||
mp_err ret;
|
mp_err ret;
|
||||||
mp_int vp, vq, u;
|
mp_int vp, vq, u;
|
||||||
int where = 0; /* Ignore the set-but-unused warning from this */
|
int where HEIMDAL_UNUSED_ATTRIBUTE = 0;
|
||||||
|
|
||||||
FIRST(mp_init_multi(&vp, &vq, &u, NULL));
|
FIRST(mp_init_multi(&vp, &vq, &u, NULL));
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ gen_p(int bits, enum gen_pq_type pq_type, uint8_t nibble_pair, mp_int *p, mp_int
|
|||||||
size_t len = (bits + 7) / 8;
|
size_t len = (bits + 7) / 8;
|
||||||
int trials = mp_prime_rabin_miller_trials(bits);
|
int trials = mp_prime_rabin_miller_trials(bits);
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
int where = 0; /* Ignore the set-but-unused warning from this */
|
int where HEIMDAL_UNUSED_ATTRIBUTE = 0;
|
||||||
|
|
||||||
|
|
||||||
FIRST(mp_init_multi(&t1, &t2, NULL));
|
FIRST(mp_init_multi(&t1, &t2, NULL));
|
||||||
|
Reference in New Issue
Block a user