macros.h: add FALL_THROUGH macro

This commit is contained in:
Thomas Bernard 2019-09-24 12:04:40 +02:00
parent ed9ef746a0
commit 8cb006c538
1 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/* $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 */
@ -10,6 +10,12 @@
#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