MSVC: lower C4100 warning level from 4 to 3

This better aligns with OSX/Linux warnings.

Although `__pragma(warning(suppress:4100))` is not the same as
`__attribute__((__unused__))` in gcc (which only affects the attribute
instead of the line), it still seems to be better to use it than to
hide the warning entirely.
This commit is contained in:
Germano Cavalcante
2023-02-04 03:12:23 -03:00
committed by Germano Cavalcante
parent f4db58844d
commit db4e7616f3
13 changed files with 45 additions and 17 deletions

View File

@@ -10,6 +10,9 @@
#ifdef __GNUC__
# define UNUSED(x) UNUSED_##x __attribute__((__unused__))
#elif defined(_MSC_VER)
/* NOTE: This suppresses the warning for the line, not the attribute. */
# define UNUSED(x) UNUSED_##x __pragma(warning(suppress : 4100))
#else
# define UNUSED(x) UNUSED_##x
#endif