Browse Source

fix implicit fallthrough spelling

This commit fixes the syntax of the implicit fallthrough comments, in
order to be matched by GCC (and probably other compilers as well) with
the following regular expression:

[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )? fall(s | |-)?thr(ough|u)[
\t.!]*(-[^\n\r]*)?

See: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough=
dynamic-accesslists
Romain Porte 3 years ago committed by Dirk Engling
parent
commit
019d58d154
  1. 4
      proxy.c
  2. 4
      trackerlogic.c

4
proxy.c

@ -171,8 +171,8 @@ size_t remove_peer_from_torrent_proxy( ot_hash hash, ot_peer *peer ) { @@ -171,8 +171,8 @@ size_t remove_peer_from_torrent_proxy( ot_hash hash, ot_peer *peer ) {
if( exactmatch ) {
ot_peerlist *peer_list = torrent->peer_list;
switch( vector_remove_peer( &peer_list->peers, peer ) ) {
case 2: peer_list->seed_count--; /* Fall throughs intended */
case 1: peer_list->peer_count--; /* Fall throughs intended */
case 2: peer_list->seed_count--; /* Intentional fallthrough */
case 1: peer_list->peer_count--; /* Intentional fallthrough */
default: break;
}
}

4
trackerlogic.c

@ -365,8 +365,8 @@ size_t remove_peer_from_torrent( PROTO_FLAG proto, struct ot_workstruct *ws ) { @@ -365,8 +365,8 @@ size_t remove_peer_from_torrent( PROTO_FLAG proto, struct ot_workstruct *ws ) {
if( exactmatch ) {
peer_list = torrent->peer_list;
switch( vector_remove_peer( &peer_list->peers, &ws->peer ) ) {
case 2: peer_list->seed_count--; /* Fall throughs intended */
case 1: peer_list->peer_count--; /* Fall throughs intended */
case 2: peer_list->seed_count--; /* Intentional fallthrough */
case 1: peer_list->peer_count--; /* Intentional fallthrough */
default: break;
}
}

Loading…
Cancel
Save