[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1422717298-6222-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sat, 31 Jan 2015 16:14:58 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: William Hubbs <w.d.hubbs@...il.com>,
Chris Brannon <chris@...-brannons.com>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Kirk Reiser <kirk@...sers.ca>,
Samuel Thibault <samuel.thibault@...-lyon.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Domagoj Trsan <domagoj.trsan@...il.com>,
Melike Yurtoglu <aysemelikeyurtoglu@...il.com>,
speakup@...ux-speakup.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: speakup: varhandlers: Removed variables that is never used
Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/staging/speakup/varhandlers.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c
index 1b0d1c0..4618ae1 100644
--- a/drivers/staging/speakup/varhandlers.c
+++ b/drivers/staging/speakup/varhandlers.c
@@ -178,7 +178,6 @@ int spk_set_num_var(int input, struct st_var_header *var, int how)
int val;
short ret = 0;
int *p_val = var->p_val;
- int l;
char buf[32];
char *cp;
struct var_t *var_data = var->data;
@@ -235,10 +234,9 @@ int spk_set_num_var(int input, struct st_var_header *var, int how)
else
cp = buf;
if (!var_data->u.n.out_str)
- l = sprintf(cp, var_data->u.n.synth_fmt, (int)val);
+ sprintf(cp, var_data->u.n.synth_fmt, (int)val);
else
- l = sprintf(cp,
- var_data->u.n.synth_fmt, var_data->u.n.out_str[val]);
+ sprintf(cp, var_data->u.n.synth_fmt, var_data->u.n.out_str[val]);
synth_printf("%s", cp);
return ret;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists