From df18cf0a41cae0e7af45020e9f0485c578e9c8b5 Mon Sep 17 00:00:00 2001 From: Victor Hahn Date: Fri, 27 May 2016 14:06:41 +0200 Subject: [PATCH] Supress escalating manual warnings to errors for clang --- ngx_http_auth_ldap_module.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c index 75b9e3f..9c34b26 100644 --- a/ngx_http_auth_ldap_module.c +++ b/ngx_http_auth_ldap_module.c @@ -35,7 +35,16 @@ // used for manual warnings #define XSTR(x) STR(x) #define STR(x) #x +// make sure manual warnings don't get escalated to errors +#ifdef __clang__ +#pragma clang diagnostic warning "-W#warnings" +#else +#ifdef __GNUC__ #pragma GCC diagnostic warning "-Wcpp" +#endif +#endif +// TODO: do the same stuff for MSVC and/or other compilers + #ifndef LDAP_PROTO_EXT /* Some OpenLDAP headers are accidentally missing ldap_init_fd() etc. */