From: Charles Kerr Date: Sun, 17 Feb 2019 23:52:41 +0000 (+0000) Subject: fix: implicit fallthrough warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1339c0b3a91e7499f309f171b8213a53e547d089;p=transmission fix: implicit fallthrough warning --- diff --git a/libtransmission/tr-macros.h b/libtransmission/tr-macros.h index b03ad16d7..af0f42a0c 100644 --- a/libtransmission/tr-macros.h +++ b/libtransmission/tr-macros.h @@ -125,6 +125,12 @@ #define TR_GNUC_MALLOC #endif +#if __has_attribute(fallthrough) || TR_GNUC_CHECK_VERSION(7, 0) +#define TR_GNUC_FALLTHROUGH __attribute__((fallthrough)) +#else +#define TR_GNUC_FALLTHROUGH +#endif + /*** **** ***/ diff --git a/utils/remote.c b/utils/remote.c index 9f2b56166..5d0322b2f 100644 --- a/utils/remote.c +++ b/utils/remote.c @@ -2054,6 +2054,7 @@ static int processResponse(char const* rpcurl, void const* response, size_t len) } /* fall-through to default: to give success or failure msg */ + TR_GNUC_FALLTHROUGH } default: