summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Aulery <lkppo@free.fr>2013-07-07 22:50:29 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-01-06 14:40:01 -0800
commitaa3d39389bfc752486a83933574d0365c74d4e29 (patch)
treee9744b0dfa084acad2a517084846b7ca34501804
parent8d156f428912aecdd493e075b75e735bfbae7dda (diff)
Reduce scope of cell (cppcheck --verbose --enable=all)
Signed-off-by: Stéphane Aulery <lkppo@free.fr> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--math.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/math.c b/math.c
index bd016fd..e74cca6 100644
--- a/math.c
+++ b/math.c
@@ -210,12 +210,13 @@ DrawDisplay(void)
void
numeric(int keynum)
{
- char st[2];
- int cell = 0;
+ char st[2];
flagINV=0;
if (rpn && (memop == kSTO || memop == kRCL || memop == kSUM)) {
+ int cell = 0;
+
switch (keynum) {
case kONE: cell = 1; break;
case kTWO: cell = 2; break;