From ab77be6bf78932ec5bb357341f4bb2ca3e1103c7 Mon Sep 17 00:00:00 2001 From: Joseph Klix Date: Tue, 28 Feb 2023 11:43:28 -0800 Subject: [PATCH] change #if _MSC_VER to #ifdef _MSC_VER (#551) --- source/channel.c | 2 +- source/channel_bootstrap.c | 2 +- source/socket_channel_handler.c | 2 +- source/windows/iocp/socket.c | 2 +- source/windows/secure_channel_tls_handler.c | 2 +- source/windows/windows_pki_utils.c | 2 +- tests/pkcs11_test.c | 2 +- tests/read_write_test_handler.c | 2 +- tests/socket_test.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/channel.c b/source/channel.c index 8f85a7b9c..b741513cc 100644 --- a/source/channel.c +++ b/source/channel.c @@ -14,7 +14,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif diff --git a/source/channel_bootstrap.c b/source/channel_bootstrap.c index 2c351b0d0..b65f64d1d 100644 --- a/source/channel_bootstrap.c +++ b/source/channel_bootstrap.c @@ -12,7 +12,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER /* non-constant aggregate initializer */ # pragma warning(disable : 4204) /* allow automatic variable to escape scope diff --git a/source/socket_channel_handler.c b/source/socket_channel_handler.c index 6e78b9d6b..54bdcea7b 100644 --- a/source/socket_channel_handler.c +++ b/source/socket_channel_handler.c @@ -12,7 +12,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif diff --git a/source/windows/iocp/socket.c b/source/windows/iocp/socket.c index 4f2f1b4ea..528cac0af 100644 --- a/source/windows/iocp/socket.c +++ b/source/windows/iocp/socket.c @@ -34,7 +34,7 @@ below, clang-format doesn't work (at least on my version) with the c-style comme #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4221) /* aggregate initializer using local variable addresses */ # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif diff --git a/source/windows/secure_channel_tls_handler.c b/source/windows/secure_channel_tls_handler.c index 774ab81f2..415da7034 100644 --- a/source/windows/secure_channel_tls_handler.c +++ b/source/windows/secure_channel_tls_handler.c @@ -29,7 +29,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4221) /* aggregate initializer using local variable addresses */ # pragma warning(disable : 4204) /* non-constant aggregate initializer */ # pragma warning(disable : 4306) /* Identifier is type cast to a larger pointer. */ diff --git a/source/windows/windows_pki_utils.c b/source/windows/windows_pki_utils.c index d5d808f90..921b1cc5a 100644 --- a/source/windows/windows_pki_utils.c +++ b/source/windows/windows_pki_utils.c @@ -13,7 +13,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4221) /* aggregate initializer using local variable addresses */ # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif diff --git a/tests/pkcs11_test.c b/tests/pkcs11_test.c index bfbf7b1d0..352b1d245 100644 --- a/tests/pkcs11_test.c +++ b/tests/pkcs11_test.c @@ -26,7 +26,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4996) /* allow strncpy() */ #endif diff --git a/tests/read_write_test_handler.c b/tests/read_write_test_handler.c index 6a57a6298..c43241aad 100644 --- a/tests/read_write_test_handler.c +++ b/tests/read_write_test_handler.c @@ -11,7 +11,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4204) /* non-constant aggregate initializer */ # pragma warning(disable : 4267) /* size_t to int conversion */ #endif diff --git a/tests/socket_test.c b/tests/socket_test.c index ffeae5cc7..8fdec354a 100644 --- a/tests/socket_test.c +++ b/tests/socket_test.c @@ -20,7 +20,7 @@ # define LOCAL_SOCK_TEST_PATTERN "testsock%llu.sock" #endif -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4996) /* strncpy */ #endif