From 5cf17cd330ebe34736116fe5b901343f9111d987 Mon Sep 17 00:00:00 2001 From: Joseph Klix Date: Tue, 28 Feb 2023 11:38:50 -0800 Subject: [PATCH] change '#if _MSC_VER' to '#ifdef _MSC_VER' (#987) --- include/aws/common/private/lookup3.inl | 4 ++-- include/aws/testing/aws_test_harness.h | 2 +- source/log_formatter.c | 2 +- source/logging.c | 6 +++--- source/uri.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/aws/common/private/lookup3.inl b/include/aws/common/private/lookup3.inl index 50b269fc7..5695861c8 100644 --- a/include/aws/common/private/lookup3.inl +++ b/include/aws/common/private/lookup3.inl @@ -60,7 +60,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy. # include /* attempt to define endianness */ #endif -#if _MSC_VER +#ifdef _MSC_VER #pragma warning(push) #pragma warning(disable:4127) /*Disable "conditional expression is constant" */ #endif /* _MSC_VER */ @@ -1055,7 +1055,7 @@ int main() #endif /* SELF_TEST */ -#if _MSC_VER +#ifdef _MSC_VER #pragma warning(pop) #endif /* _MSC_VER */ diff --git a/include/aws/testing/aws_test_harness.h b/include/aws/testing/aws_test_harness.h index aba27021a..0cbc02f55 100644 --- a/include/aws/testing/aws_test_harness.h +++ b/include/aws/testing/aws_test_harness.h @@ -26,7 +26,7 @@ the AWS_UNSTABLE_TESTING_API compiler flag # define AWS_TESTING_REPORT_FD stderr #endif -#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/log_formatter.c b/source/log_formatter.c index 513a7f87b..d4be0c0c6 100644 --- a/source/log_formatter.c +++ b/source/log_formatter.c @@ -16,7 +16,7 @@ * Default formatter implementation */ -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif diff --git a/source/logging.c b/source/logging.c index dddef8fae..fdc29576d 100644 --- a/source/logging.c +++ b/source/logging.c @@ -15,7 +15,7 @@ #include #include -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(disable : 4204) /* non-constant aggregate initializer */ #endif @@ -468,7 +468,7 @@ static int s_noalloc_stderr_logger_log( va_list format_args; va_start(format_args, format); -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(push) # pragma warning(disable : 4221) /* allow struct member to reference format_buffer */ #endif @@ -484,7 +484,7 @@ static int s_noalloc_stderr_logger_log( .amount_written = 0, }; -#if _MSC_VER +#ifdef _MSC_VER # pragma warning(pop) /* disallow struct member to reference local value */ #endif diff --git a/source/uri.c b/source/uri.c index e6ce7f8f6..1fafc9492 100644 --- a/source/uri.c +++ b/source/uri.c @@ -11,7 +11,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