]> granicus.if.org Git - transmission/commitdiff
fix: implicit fallthrough warning
authorCharles Kerr <ckerr@github.com>
Sun, 17 Feb 2019 23:52:41 +0000 (23:52 +0000)
committerCharles Kerr <ckerr@github.com>
Sun, 17 Feb 2019 23:52:41 +0000 (23:52 +0000)
libtransmission/tr-macros.h
utils/remote.c

index b03ad16d7cf9c0a25d47562bc4e3c7c4a791f77c..af0f42a0ca56558d95a9a5a46db2e8791d130894 100644 (file)
 #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
+
 /***
 ****
 ***/
index 9f2b561663f3beaa8209c6b302241e8fb0a0d3a0..5d0322b2fab3e71d4092a03efa43d46ff70cc83f 100644 (file)
@@ -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: