From aa3d39389bfc752486a83933574d0365c74d4e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Aulery?= Date: Sun, 7 Jul 2013 22:50:29 +0200 Subject: Reduce scope of cell (cppcheck --verbose --enable=all) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Aulery Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith --- math.c | 5 +++-- 1 file 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; -- cgit v1.2.3