[PATCH xcalc 2/3] Reduce scope off cell (cppcheck --verbose --enable=all)

Stéphane Aulery lkppo at free.fr
Sun Jul 7 13:50:29 PDT 2013


Signed-off-by: Stéphane Aulery <lkppo at free.fr>
---
 math.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/math.c b/math.c
index 7332372..a8c4a5c 100644
--- a/math.c
+++ b/math.c
@@ -200,12 +200,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;
-- 
1.7.10.4



More information about the xorg-devel mailing list