diff options
Diffstat (limited to 'libpam/include')
-rw-r--r-- | libpam/include/pam_cc_compat.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libpam/include/pam_cc_compat.h b/libpam/include/pam_cc_compat.h index 69190368..0a6e32d5 100644 --- a/libpam/include/pam_cc_compat.h +++ b/libpam/include/pam_cc_compat.h @@ -32,6 +32,11 @@ _Pragma("GCC diagnostic ignored \"-Wcast-align\"") # define DIAG_POP_IGNORE_CAST_ALIGN \ _Pragma("GCC diagnostic pop") +# define DIAG_PUSH_IGNORE_FORMAT_NONLITERAL \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") +# define DIAG_POP_IGNORE_FORMAT_NONLITERAL \ + _Pragma("GCC diagnostic pop") #elif PAM_CLANG_PREREQ(2, 6) # define DIAG_PUSH_IGNORE_CAST_QUAL \ _Pragma("clang diagnostic push"); \ @@ -43,11 +48,18 @@ _Pragma("clang diagnostic ignored \"-Wcast-align\"") # define DIAG_POP_IGNORE_CAST_ALIGN \ _Pragma("clang diagnostic pop") +# define DIAG_PUSH_IGNORE_FORMAT_NONLITERAL \ + _Pragma("clang diagnostic push"); \ + _Pragma("clang diagnostic ignored \"-Wformat-nonliteral\"") +# define DIAG_POP_IGNORE_FORMAT_NONLITERAL \ + _Pragma("clang diagnostic pop") #else -# define DIAG_PUSH_IGNORE_CAST_QUAL /* empty */ -# define DIAG_POP_IGNORE_CAST_QUAL /* empty */ -# define DIAG_PUSH_IGNORE_CAST_ALIGN /* empty */ -# define DIAG_POP_IGNORE_CAST_ALIGN /* empty */ +# define DIAG_PUSH_IGNORE_CAST_QUAL /* empty */ +# define DIAG_POP_IGNORE_CAST_QUAL /* empty */ +# define DIAG_PUSH_IGNORE_CAST_ALIGN /* empty */ +# define DIAG_POP_IGNORE_CAST_ALIGN /* empty */ +# define DIAG_PUSH_IGNORE_FORMAT_NONLITERAL /* empty */ +# define DIAG_POP_IGNORE_FORMAT_NONLITERAL /* empty */ #endif /* |