Skip to content

Commit

Permalink
change #if _MSC_VER to #ifdef _MSC_VER (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmklix authored Feb 28, 2023
1 parent c225380 commit ab77be6
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion source/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <aws/io/message_pool.h>
#include <aws/io/statistics.h>

#if _MSC_VER
#ifdef _MSC_VER
# pragma warning(disable : 4204) /* non-constant aggregate initializer */
#endif

Expand Down
2 changes: 1 addition & 1 deletion source/channel_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <aws/io/socket_channel_handler.h>
#include <aws/io/tls_channel_handler.h>

#if _MSC_VER
#ifdef _MSC_VER
/* non-constant aggregate initializer */
# pragma warning(disable : 4204)
/* allow automatic variable to escape scope
Expand Down
2 changes: 1 addition & 1 deletion source/socket_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <aws/io/socket.h>
#include <aws/io/statistics.h>

#if _MSC_VER
#ifdef _MSC_VER
# pragma warning(disable : 4204) /* non-constant aggregate initializer */
#endif

Expand Down
2 changes: 1 addition & 1 deletion source/windows/iocp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ below, clang-format doesn't work (at least on my version) with the c-style comme
#include <stdlib.h>
#include <string.h>

#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
Expand Down
2 changes: 1 addition & 1 deletion source/windows/secure_channel_tls_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <stdio.h>
#include <stdlib.h>

#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. */
Expand Down
2 changes: 1 addition & 1 deletion source/windows/windows_pki_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>

#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
Expand Down
2 changes: 1 addition & 1 deletion tests/pkcs11_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <aws/io/tls_channel_handler.h>
#include <aws/testing/aws_test_harness.h>

#if _MSC_VER
#ifdef _MSC_VER
# pragma warning(disable : 4996) /* allow strncpy() */
#endif

Expand Down
2 changes: 1 addition & 1 deletion tests/read_write_test_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <aws/common/task_scheduler.h>
#include <aws/io/channel.h>

#if _MSC_VER
#ifdef _MSC_VER
# pragma warning(disable : 4204) /* non-constant aggregate initializer */
# pragma warning(disable : 4267) /* size_t to int conversion */
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/socket_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ab77be6

Please sign in to comment.