mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 01:00:41 +01:00
build: Fix #pragma GCC diagnostic not allowed inside functions
Commit 829a6f6 "CI: improve use of github action matrix feature; optimization" has introduced use of #pragma GCC diagnostic in function doNameLine() of runtime/conf.c. This is not supported by old compilers like GCC 4.4.7 on el6.
This commit is contained in:
parent
f901f113d2
commit
21b5e0225e
@ -110,8 +110,15 @@
|
||||
_Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"")
|
||||
#define PRAGMA_IGNORE_Wdeprecated_declarations \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
#define PRAGMA_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
|
||||
#define PRAGMA_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
|
||||
#if __GNUC__ >= 5
|
||||
#define PRAGMA_DIAGNOSTIC_PUSH \
|
||||
_Pragma("GCC diagnostic push")
|
||||
#define PRAGMA_DIAGNOSTIC_POP \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
#define PRAGMA_DIAGNOSTIC_PUSH
|
||||
#define PRAGMA_DIAGNOSTIC_POP
|
||||
#endif
|
||||
#else
|
||||
#define PRAGMA_INGORE_Wswitch_enum
|
||||
#define PRAGMA_IGNORE_Wsign_compare
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user