Browse Source

Disable SSL_CTX_set_info_callback warning only for clang (GCC does not know this pragma)

bel2125 7 years ago
parent
commit
e393d4e58e
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/civetweb.c

+ 5 - 5
src/civetweb.c

@@ -14134,9 +14134,9 @@ set_ssl_option(struct mg_context *ctx)
 	SSL_CTX_set_ecdh_auto(ctx->ssl_ctx, 1);
 	SSL_CTX_set_ecdh_auto(ctx->ssl_ctx, 1);
 #endif /* NO_SSL_DL */
 #endif /* NO_SSL_DL */
 
 
-#if defined(__GNUC__) || defined(__MINGW32__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
 #endif
 #endif
 	/* Depending on the OpenSSL version, the callback may be
 	/* Depending on the OpenSSL version, the callback may be
 	 * 'void (*)(SSL *, int, int)' or 'void (*)(const SSL *, int, int)'
 	 * 'void (*)(SSL *, int, int)' or 'void (*)(const SSL *, int, int)'
@@ -14152,8 +14152,8 @@ set_ssl_option(struct mg_context *ctx)
 	 */
 	 */
 	SSL_CTX_set_info_callback(ctx->ssl_ctx, ssl_info_callback);
 	SSL_CTX_set_info_callback(ctx->ssl_ctx, ssl_info_callback);
 
 
-#if defined(__GNUC__) || defined(__MINGW32__)
-#pragma GCC diagnostic pop
+#ifdef __clang__
+#pragma clang diagnostic pop
 #endif
 #endif
 
 
 	/* If a callback has been specified, call it. */
 	/* If a callback has been specified, call it. */