From 8df4b463f69fc3e7e08ce5de284ed7f318935c1e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 5 May 2018 12:20:12 -0700 Subject: Reword fall through comments to appease gcc -Wimplicit-fallthrough Gets rid of these warnings: math.c:707:24: warning: this statement may fall through [-Wimplicit-fallthrough=] case kSQR: flagINV = !flagINV; /* fall through to */ ~~~~~~~~^~~~~~~~~~ math.c:708:3: note: here case kSQRT: if (flagINV) dnum=dnum*dnum; ^~~~ math.c:711:24: warning: this statement may fall through [-Wimplicit-fallthrough=] case k10X: flagINV = !flagINV; /* fall through to */ ~~~~~~~~^~~~~~~~~~ math.c:712:3: note: here case kLOG: if (flagINV) dnum=pow(10.0,dnum); ^~~~ math.c:715:24: warning: this statement may fall through [-Wimplicit-fallthrough=] case kEXP: flagINV = !flagINV; /* fall through to */ ~~~~~~~~^~~~~~~~~~ math.c:716:3: note: here case kLN: if (flagINV) dnum=exp(dnum); ^~~~ Signed-off-by: Alan Coopersmith --- math.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/math.c b/math.c index 436bff2..bd016fd 100644 --- a/math.c +++ b/math.c @@ -704,15 +704,15 @@ oneop(int keynum) case kE: if (rpn && memop != kENTR) PushNum(dnum); dnum=M_E; break; case kPI: if (rpn && memop != kENTR) PushNum(dnum); dnum=M_PI; break; case kRECIP: dnum=1.0/dnum; break; - case kSQR: flagINV = !flagINV; /* fall through to */ + case kSQR: flagINV = !flagINV; /* fall through */ case kSQRT: if (flagINV) dnum=dnum*dnum; else dnum=sqrt(dnum); break; - case k10X: flagINV = !flagINV; /* fall through to */ + case k10X: flagINV = !flagINV; /* fall through */ case kLOG: if (flagINV) dnum=pow(10.0,dnum); else dnum=log10(dnum); break; - case kEXP: flagINV = !flagINV; /* fall through to */ + case kEXP: flagINV = !flagINV; /* fall through */ case kLN: if (flagINV) dnum=exp(dnum); else dnum=log(dnum); break; -- cgit v1.2.3