macros.h: add FALL_THROUGH macro
-/* $Id: macros.h,v 1.1 2012/04/30 20:37:56 nanard Exp $ */
+/* $Id: macros.h,v 1.5 2019/09/24 09:37:52 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
- * (c) 2012-2015 Thomas Bernard
+ * (c) 2012-2019 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
#define UNUSED(arg) (void)(arg)
+#if defined(__GNUC__) && (__GNUC__ >= 7)
+#define FALL_THROUGH __attribute__((fallthrough))
+#else
+#define FALL_THROUGH
+#endif
+
#include <stdint.h>
#ifndef INLINE
