summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Porte <microjoe@microjoe.org>2021-08-03 13:59:09 +0200
committerDirk Engling <erdgeist@erdgeist.org>2021-08-22 14:42:17 +0200
commit019d58d154a878aea845989f1a5f4f4eb3b80673 (patch)
treea77cb78961be5d8fdda58bb33b7c73aec07b0fbe
parentc4fc41a8315614dd91119b34330152775682e280 (diff)
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=
-rw-r--r--proxy.c4
-rw-r--r--trackerlogic.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/proxy.c b/proxy.c
index 640958a..619b08a 100644
--- a/proxy.c
+++ b/proxy.c
@@ -171,8 +171,8 @@ size_t remove_peer_from_torrent_proxy( ot_hash hash, ot_peer *peer ) {
171 if( exactmatch ) { 171 if( exactmatch ) {
172 ot_peerlist *peer_list = torrent->peer_list; 172 ot_peerlist *peer_list = torrent->peer_list;
173 switch( vector_remove_peer( &peer_list->peers, peer ) ) { 173 switch( vector_remove_peer( &peer_list->peers, peer ) ) {
174 case 2: peer_list->seed_count--; /* Fall throughs intended */ 174 case 2: peer_list->seed_count--; /* Intentional fallthrough */
175 case 1: peer_list->peer_count--; /* Fall throughs intended */ 175 case 1: peer_list->peer_count--; /* Intentional fallthrough */
176 default: break; 176 default: break;
177 } 177 }
178 } 178 }
diff --git a/trackerlogic.c b/trackerlogic.c
index ea4b489..719f8a2 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -365,8 +365,8 @@ size_t remove_peer_from_torrent( PROTO_FLAG proto, struct ot_workstruct *ws ) {
365 if( exactmatch ) { 365 if( exactmatch ) {
366 peer_list = torrent->peer_list; 366 peer_list = torrent->peer_list;
367 switch( vector_remove_peer( &peer_list->peers, &ws->peer ) ) { 367 switch( vector_remove_peer( &peer_list->peers, &ws->peer ) ) {
368 case 2: peer_list->seed_count--; /* Fall throughs intended */ 368 case 2: peer_list->seed_count--; /* Intentional fallthrough */
369 case 1: peer_list->peer_count--; /* Fall throughs intended */ 369 case 1: peer_list->peer_count--; /* Intentional fallthrough */
370 default: break; 370 default: break;
371 } 371 }
372 } 372 }