Merge pull request #3631 from jriwanek-forks/plat

Make plat_fallthrough and plat_unused headers less fragile
This commit is contained in:
Miran Grča
2023-08-24 01:15:57 +02:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#ifndef EMU_PLAT_FALLTHROUGH_H
#define EMU_PLAT_FALLTHROUGH_H
#ifndef EMU_PLAT_H
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#else
@@ -30,5 +31,6 @@
# define fallthrough do {} while (0) /* fallthrough */
# endif
#endif
#endif
#endif /*EMU_PLAT_FALLTHROUGH_H*/

View File

@@ -21,11 +21,13 @@
#ifndef EMU_PLAT_UNUSED_H
#define EMU_PLAT_UNUSED_H
#ifndef EMU_PLAT_H
#ifdef _MSC_VER
# define UNUSED(arg) arg
#else
/* A hack (GCC-specific?) to allow us to ignore unused parameters. */
# define UNUSED(arg) __attribute__((unused)) arg
#endif
#endif
#endif /*EMU_PLAT_UNUSED_H*/