New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unresolved fall-through warnings from GCC 7 #618
Comments
This change addresses one of the warnings listed in the bug report. ./print-isoclns.c: In function ‘clnp_print’: ./print-isoclns.c:1054:16: warning: this statement may fall through [-Wimplicit-fallthrough=] if (EXTRACT_U_1(pptr) == NLPID_CLNP) { ^ ./print-isoclns.c:1061:9: note: here case CLNP_PDU_DT: ^~~~ [skip ci]
The CLNP part of this problem has been solved (I have found the complete CLNP spec). I have asked for help with the Rx (AFS3) part on the openafs-devel mailing list. |
Hopefully the help offered on the openafs-devel list will come through, but I note that in addition to the "spec" at http://git.openafs.org/?p=openafs.git;a=blob;f=doc/txt/rx-spec.txt;h=c1499132ebba3109231647bf4fbb3c5034a80c55;hb=HEAD and the OpenAFS implementation, the linux AF_RXRPC is the same Rx protocol. |
Thank you for the update. I think I had looked through |
I took a look. The first two ("bulk stat" and "callback"; lines 1023 and 1282) should not fall through, but the other two ("list entry" in various forms, lines 1741 and 1790) should fall through. |
I take your word for it. Now it only remains to add two instances of |
Sadly, I'm a bit overworked at the moment; if you could author the change, that would be great. |
Benjamin Kaduk explains in the issue comments: The first two ("bulk stat" and "callback"; lines 1023 and 1282) should not fall through, but the other two ("list entry" in various forms, lines 1741 and 1790) should fall through. The answer lies in the RPC-L files at [1], [2] and [3] (also line 396), looking at the appropriate IN or OUT arguments. 1: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afsint.xg;h=9fe4980c6cffcae457789e363393825e29dcb7b1;hb=HEAD#l594 2: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afscbint.xg;h=19760bc512c647595662c30e190303b3a20be983;hb=HEAD#l22 3: http://git.openafs.org/?p=openafs.git;a=blob;f=src/vlserver/vldbint.xg;h=ff34d12d45454de328439cab3ed896fd564f0c59;hb=HEAD#l341
The fix is in the master branch now, thank you very much! |
Benjamin Kaduk explains in the issue comments: The first two ("bulk stat" and "callback"; lines 1023 and 1282) should not fall through, but the other two ("list entry" in various forms, lines 1741 and 1790) should fall through. The answer lies in the RPC-L files at [1], [2] and [3] (also line 396), looking at the appropriate IN or OUT arguments. 1: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afsint.xg;h=9fe4980c6cffcae457789e363393825e29dcb7b1;hb=HEAD#l594 2: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afscbint.xg;h=19760bc512c647595662c30e190303b3a20be983;hb=HEAD#l22 3: http://git.openafs.org/?p=openafs.git;a=blob;f=src/vlserver/vldbint.xg;h=ff34d12d45454de328439cab3ed896fd564f0c59;hb=HEAD#l341 (backported from commit 8677e5b)
This change addresses one of the warnings listed in the bug report. ./print-isoclns.c: In function ‘clnp_print’: ./print-isoclns.c:1054:16: warning: this statement may fall through [-Wimplicit-fallthrough=] if (EXTRACT_U_1(pptr) == NLPID_CLNP) { ^ ./print-isoclns.c:1061:9: note: here case CLNP_PDU_DT: ^~~~ [skip ci]
Benjamin Kaduk explains in the issue comments: The first two ("bulk stat" and "callback"; lines 1023 and 1282) should not fall through, but the other two ("list entry" in various forms, lines 1741 and 1790) should fall through. The answer lies in the RPC-L files at [1], [2] and [3] (also line 396), looking at the appropriate IN or OUT arguments. 1: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afsint.xg;h=9fe4980c6cffcae457789e363393825e29dcb7b1;hb=HEAD#l594 2: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afscbint.xg;h=19760bc512c647595662c30e190303b3a20be983;hb=HEAD#l22 3: http://git.openafs.org/?p=openafs.git;a=blob;f=src/vlserver/vldbint.xg;h=ff34d12d45454de328439cab3ed896fd564f0c59;hb=HEAD#l341
A test build on Fedora 26 had produced a number of fall-through warnings, some of which I could resolve but the ones below still stand:
print-isoclns.c
(not previously detected by Coverity). I could find a few CNLP packet diagrams but it was not enough to understand how to resolve.print-rx.c
(existing Coverity defects 603361, 603362, 603363 and 976452). The only description of the Rx protocol used in AFS I could find was the OpenAFS git repository, in which I could not find anything to relate with the case blocks below. My best guess here is all four fall-through cases are not intentional.The text was updated successfully, but these errors were encountered: