mirror of
https://github.com/apache/httpd.git
synced 2026-10-23 22:49:01 +03:00
* modules/loggers/mod_log_json.c: Fix compiler warning pragmas around
jansson includes. Check for clang before GCC (since clang defines __GNUC__), and add matching pragma pop directives. PR: 70189 Submitted by: Yongqiang Tian <yqtian668 gmail.com> GitHub: closes #743 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937947 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -29,21 +29,29 @@
|
||||
/* jansson thinks everyone compiles with the platform's cc in its fullest capabilities
|
||||
* when undefining their INLINEs, we get static, unused functions, arg
|
||||
*/
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#pragma clang diagnostic ignored "-Wunreachable-code"
|
||||
#elif defined(__GNUC__)
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
||||
#pragma GCC diagnostic push
|
||||
#endif
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#pragma GCC diagnostic ignored "-Wunreachable-code"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
#include <jansson_config.h>
|
||||
#undef JSON_INLINE
|
||||
#define JSON_INLINE
|
||||
#include <jansson.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__GNUC__)
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
APLOG_USE_MODULE(log_json);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user