From c2f282dfcffbb23f980cb7aea03361c7e626d782 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 11 Mar 2018 13:14:38 -0700 Subject: [PATCH] Commented out unused static variables. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As opposed to using __attribute__((unused)) This fixed the following two warnings: ``` drivers/aes1610.c:736:34: warning: ‘stop_reader’ defined but not used [-Wunused-const-variable=] drivers/aes2501.c:671:34: warning: ‘init_3’ defined but not used [-Wunused-const-variable=] ``` The previous commit fixes -Wmisleading-indentation ``` nbis/mindtct/morph.c:152:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] nbis/mindtct/morph.c:176:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] nbis/mindtct/morph.c:200:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] nbis/mindtct/morph.c:222:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] ``` https://bugs.freedesktop.org/show_bug.cgi?id=105429 --- libfprint/drivers/aes1610.c | 5 +++-- libfprint/drivers/aes2501.c | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libfprint/drivers/aes1610.c b/libfprint/drivers/aes1610.c index a474a8b..79e35c4 100644 --- a/libfprint/drivers/aes1610.c +++ b/libfprint/drivers/aes1610.c @@ -733,10 +733,11 @@ static const struct aes_regwrite init[] = { { 0x82, 0x00 } }; -static const struct aes_regwrite stop_reader[] __attribute__((unused)) = { +/* +static const struct aes_regwrite stop_reader[] = { { 0xFF, 0x00 } }; - +*/ enum activate_states { WRITE_INIT, diff --git a/libfprint/drivers/aes2501.c b/libfprint/drivers/aes2501.c index dd4a1a5..2ccddda 100644 --- a/libfprint/drivers/aes2501.c +++ b/libfprint/drivers/aes2501.c @@ -668,7 +668,8 @@ static const struct aes_regwrite init_2[] = { { AES2501_REG_CTRL1, AES2501_CTRL1_REG_UPDATE }, }; -static const struct aes_regwrite init_3[] __attribute__((unused)) = { +/* +static const struct aes_regwrite init_3[] = { { 0xff, 0x00 }, { AES2501_REG_CTRL1, AES2501_CTRL1_MASTER_RESET }, { AES2501_REG_AUTOCALOFFSET, 0x41 }, @@ -676,6 +677,7 @@ static const struct aes_regwrite init_3[] __attribute__((unused)) = { { AES2501_REG_DETCTRL, 0x53 }, { AES2501_REG_CTRL1, AES2501_CTRL1_REG_UPDATE }, }; +*/ static const struct aes_regwrite init_4[] = { { AES2501_REG_CTRL1, AES2501_CTRL1_MASTER_RESET }, -- 2.14.3