summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2018-05-05 12:20:12 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-05-05 12:20:12 -0700
commit8df4b463f69fc3e7e08ce5de284ed7f318935c1e (patch)
tree327a283edeed7513978b337a8b5f96e75b4ea8f6
parent7a90211e35841758ff11e79a1633494e2055df88 (diff)
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 <alan.coopersmith@oracle.com>
-rw-r--r--math.c6
1 files 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;