diff --git a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventHeader.h b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventHeader.h index c9fffc2b7a2c..0a5173f2e382 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventHeader.h +++ b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventHeader.h @@ -16,7 +16,7 @@ #include #include -#ifdef __MINGW32__ +#if defined(__MINGW32__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #pragma GCC diagnostic ignored "-Wuninitialized" @@ -357,6 +357,6 @@ namespace Aws } } -#ifdef __MINGW32__ +#if defined(__MINGW32__) && !defined(__clang__) #pragma GCC diagnostic pop #endif diff --git a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp index eeae903740a2..eced7b5e4365 100644 --- a/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp +++ b/src/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp @@ -335,7 +335,7 @@ static void CALLBACK WinHttpSyncLogCallback(HINTERNET hInternet, }; bool found = false; - int i; + size_t i; for (i = 0; i < sizeof(KNOWN_STATUSES) / sizeof(KNOWN_STATUSES[0]) && !found; i++) { if (dwInternetStatus == KNOWN_STATUSES[i].status) @@ -402,8 +402,8 @@ WinHttpSyncHttpClient::WinHttpSyncHttpClient(const ClientConfiguration& config) Base(), m_usingProxy(!config.proxyHost.empty()), m_verifySSL(config.verifySSL), - m_version(config.version), - m_useAnonymousAuth(config.winHTTPOptions.useAnonymousAuth) + m_useAnonymousAuth(config.winHTTPOptions.useAnonymousAuth), + m_version(config.version) { m_enableHttpClientTrace = config.enableHttpClientTrace; diff --git a/src/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp b/src/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp index c849fbc993a4..e27b8674712f 100644 --- a/src/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp +++ b/src/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp @@ -69,7 +69,6 @@ Aws::String ComputeOSVersionString() static const char* FILE_TO_CHECK = "Kernel32.dll"; DWORD fileVersionSize = GetFileVersionInfoSizeA(FILE_TO_CHECK, &uselessParameter); void* blob = Aws::Malloc("OSVersionInfo", static_cast(fileVersionSize)); - bool versionFound(false); if (GetFileVersionInfoA(FILE_TO_CHECK, 0, fileVersionSize, blob)) { @@ -95,7 +94,6 @@ Aws::String ComputeOSVersionString() if (VerQueryValueA(blob, codePageSS.str().c_str(), &subBlock, &subBlockSize)) { ss << "#" << static_cast(subBlock); - versionFound = true; } } } diff --git a/tests/aws-cpp-sdk-core-tests/aws/auth/GeneralHTTPCredentialsProviderTest.cpp b/tests/aws-cpp-sdk-core-tests/aws/auth/GeneralHTTPCredentialsProviderTest.cpp index eb5cc0003339..79143f3391c6 100644 --- a/tests/aws-cpp-sdk-core-tests/aws/auth/GeneralHTTPCredentialsProviderTest.cpp +++ b/tests/aws-cpp-sdk-core-tests/aws/auth/GeneralHTTPCredentialsProviderTest.cpp @@ -13,7 +13,7 @@ #include #include -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__clang__) // disable "warning C4702: unreachable code" from GTEST_SKIP on newer MSVS #pragma warning(disable: 4702) #endif diff --git a/tests/testing-resources/include/aws/testing/AwsCppSdkGTestSuite.h b/tests/testing-resources/include/aws/testing/AwsCppSdkGTestSuite.h index e1776618a7f7..326b894ae082 100644 --- a/tests/testing-resources/include/aws/testing/AwsCppSdkGTestSuite.h +++ b/tests/testing-resources/include/aws/testing/AwsCppSdkGTestSuite.h @@ -13,7 +13,7 @@ #include -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__clang__) // disable "warning C4702: unreachable code" from GTEST_SKIP on newer MSVS #pragma warning(disable: 4702) #endif