Fix Clang Compatibility and Remove Unused Variables by kai-ion · Pull Request #3735 · aws/aws-sdk-cpp

sbiscigl

approved these changes Feb 26, 2026

@kai-ion kai-ion added this pull request to the merge queue

Apr 2, 2026

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks

Apr 2, 2026

@eranif @sbiscigl

This commit improves compatibility with Clang on Windows and MinGW platforms
by refining preprocessor conditionals that disable specific compiler warnings.
The previous checks only tested for _WIN32 or __MINGW32__, but Clang on these
platforms does not require the same warning suppressions, leading to
unnecessary or incorrect pragma directives.

Additionally, removes unused variables in OSVersionInfo.cpp and corrects the
loop index type in WinHttpSyncHttpClient.cpp to use size_t instead of int.
The member initialization order in WinHttpSyncHttpClient's constructor has
been reordered to match the declaration order in the class definition.

* Compiler warning pragmas (AwsCppSdkGTestSuite.h, EventHeader.h, GeneralHTTPCredentialsProviderTest.cpp)
* Unused variable cleanup (OSVersionInfo.cpp)
* Type safety improvements (WinHttpSyncHttpClient.cpp)

** Generated by CodeLite. **

Signed-off-by: Eran Ifrah <eran@codelite.org>