Skip to content

Commit

Permalink
Ignore warnings-as-errors in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jan 8, 2025
1 parent a2ae406 commit 5c9a848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
21 changes: 0 additions & 21 deletions ci/rtools/awssdk_ep.patch
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,6 @@ index e26e36b60..3e7189b70 100644

class SecureRandomBytes_BCrypt : public SecureRandomBytes
{
diff --git a/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp b/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
index cdcbf103e..03bcf0258 100644
--- a/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
+++ b/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
@@ -2483,7 +2483,15 @@ CJSON_AS4CPP_PUBLIC(cJSON *) cJSON_AS4CPP_CreateInt64(long long num)
if (num > INT_MAX || num < INT_MIN)
{
char buf[21];
- snprintf(buf, sizeof(buf), "%lld", num);
+#ifdef __MINGW32__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat"
+#pragma GCC diagnostic ignored "-Wformat-extra-args"
+#endif
+ snprintf(buf, sizeof(buf), "%lld", num);
+#ifdef __MINGW32__
+#pragma GCC diagnostic pop
+#endif
item->valuestring = (char*)cJSON_AS4CPP_strdup((const unsigned char*)buf, &global_hooks);
}

diff --git a/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
index 4dade6489..a0456cf8e 100644
--- a/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5042,8 +5042,8 @@ macro(build_awssdk)
# GH-44950: This is required to build under Rtools40 and we may be able to
# remove it if/when we no longer need to build under Rtools40
if(WIN32 AND NOT MSVC)
string(APPEND AWS_C_FLAGS " -D_WIN32_WINNT=0x0601")
string(APPEND AWS_CXX_FLAGS " -D_WIN32_WINNT=0x0601")
string(APPEND AWS_C_FLAGS " -D_WIN32_WINNT=0x0601 -Wno-error -Wno-error=format= -Wno-error=format-extra-args")
string(APPEND AWS_CXX_FLAGS " -D_WIN32_WINNT=0x0601 -Wno-error -Wno-error=format= -Wno-error=format-extra-args")
endif()

set(AWSSDK_COMMON_CMAKE_ARGS
Expand Down

0 comments on commit 5c9a848

Please sign in to comment.