[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #32579 [Core Tor/Tor]: Use clang's -Wimplicit-fallthrough and fallthrough attribute on case statements
#32579: Use clang's -Wimplicit-fallthrough and fallthrough attribute on case
statements
------------------------------+----------------------------------
Reporter: teor | Owner: (none)
Type: enhancement | Status: reopened
Priority: Medium | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: code-correctness | Actual Points:
Parent ID: | Points: 1
Reviewer: | Sponsor:
------------------------------+----------------------------------
Changes (by teor):
* status: closed => reopened
* resolution: worksforme =>
Comment:
If we are doing it, we're doing it wrong, here's a fallthrough that should
require the fallthrough attribute:
{{{
src/core/proto/proto_socks.c- case SOCKS_RESULT_TRUNCATED:
src/core/proto/proto_socks.c- if (datalen == n_pullup)
src/core/proto/proto_socks.c- return 0;
src/core/proto/proto_socks.c- /* FALLTHRU */
src/core/proto/proto_socks.c- case SOCKS_RESULT_MORE_EXPECTED:
src/core/proto/proto_socks.c- res = 0;
src/core/proto/proto_socks.c- break;
}}}
I don't think comments count, and even if they do, I can't imagine this
spelling being supported :-)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32579#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs