From 019d58d154a878aea845989f1a5f4f4eb3b80673 Mon Sep 17 00:00:00 2001 From: Romain Porte Date: Tue, 3 Aug 2021 13:59:09 +0200 Subject: 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= --- proxy.c | 4 ++-- trackerlogic.c | 4 ++-- 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 ) { 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; } } 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 ) { 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; } } -- cgit v1.2.3