Skip to content

Commit

Permalink
SNOW-1527724: fix binskim issues (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-hx authored Jul 10, 2024
1 parent 1d000b9 commit b19db15
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ void aws_json_module_init(struct aws_allocator *allocator) {
void aws_json_module_cleanup(void) {
if (s_aws_json_module_initialized) {
s_aws_json_module_allocator = NULL;
cJSON_InitHooks(NULL); // custom change to keep
s_aws_json_module_initialized = false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static size_t WriteData(char* ptr, size_t size, size_t nmemb, void* userdata)
return 0;
}

size_t cur = response->GetResponseBody().tellp();
size_t cur = (size_t)response->GetResponseBody().tellp(); // custom change to keep
if (response->GetResponseBody().fail()) {
const auto& ref = response->GetResponseBody();
AWS_LOGSTREAM_ERROR(CURL_HTTP_CLIENT_TAG, "Unable to query response output position (eof: "
Expand Down Expand Up @@ -302,7 +302,7 @@ static size_t ReadBody(char* ptr, size_t size, size_t nmemb, void* userdata, boo
{
if (!ioStream->eof() && ioStream->peek() != EOF)
{
amountRead = ioStream->readsome(ptr, amountToRead);
amountRead = (size_t)ioStream->readsome(ptr, amountToRead); // custom change to keep
}
if (amountRead == 0 && !ioStream->eof())
{
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_arrow_source.bat
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ cmake ..\ ^
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF ^
-DCMAKE_INSTALL_PREFIX=%ARROW_INSTALL_DIR% ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=%runtimelink% ^
-DCMAKE_C_FLAGS="/guard:cf /wd5105 /ZH:SHA_256 /Qspectre /sdl" ^
-DCMAKE_CXX_FLAGS="/guard:cf /wd5105 /ZH:SHA_256 /Qspectre /sdl" ^
-DCMAKE_C_FLAGS="/guard:cf /Z7 /ZH:SHA_256 /Qspectre /sdl" ^
-DCMAKE_CXX_FLAGS="/guard:cf /Z7 /ZH:SHA_256 /Qspectre /sdl" ^
-DARROW_USE_STATIC_CRT=ON ^
-DARROW_BOOST_USE_SHARED=OFF ^
-DARROW_BUILD_SHARED=OFF ^
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_awssdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ cmake %AWS_SOURCE_DIR% ^
-DENABLE_TESTING=off ^
-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=ON ^
-DCMAKE_INSTALL_PREFIX=%AWS_INSTALL_DIR% ^
-DCMAKE_C_FLAGS="/D CURL_STATICLIB" ^
-DCMAKE_CXX_FLAGS="/D WIN32 /D _WINDOWS /D CURL_STATICLIB /wd4244 /EHsc /GR /ZH:SHA_256 /guard:cf /Qspectre /sdl" ^
-DCMAKE_C_FLAGS="/D CURL_STATICLIB /Z7 /W3 /ZH:SHA_256 /guard:cf /Qspectre /sdl" ^
-DCMAKE_CXX_FLAGS="/D WIN32 /D _WINDOWS /D CURL_STATICLIB /EHsc /GR /Z7 /W3 /ZH:SHA_256 /guard:cf /Qspectre /sdl" ^
-DBUILD_SHARED_LIBS=off ^
-DSTATIC_LINKING=on ^
-DENABLE_UNITY_BUILD=on ^
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_boost_source.bat
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if /I "%dynamic_runtime%"=="on" (

call "%BOOST_SOURCE_DIR%\bootstrap.bat" --with-libraries=filesystem,regex,system
if %ERRORLEVEL% NEQ 0 goto :error
b2 stage --stagedir=%BOOST_INSTALL_DIR% --includedir=%BOOST_INSTALL_DIR%\include --layout=system --with-system --with-filesystem --with-regex link=static runtime-link=%runtimelink% threading=multi address-model=%bitness% variant=%variant% runtime-debugging=%debugging% cxxflags="/ZH:SHA_256 /guard:cf /Qspectre /sdl" install
b2 stage --stagedir=%BOOST_INSTALL_DIR% --includedir=%BOOST_INSTALL_DIR%\include --layout=system --with-system --with-filesystem --with-regex link=static runtime-link=%runtimelink% threading=multi address-model=%bitness% variant=%variant% runtime-debugging=%debugging% cflags="/Z7 /ZH:SHA_256 /guard:cf /Qspectre /sdl" cxxflags="/Z7 /ZH:SHA_256 /guard:cf /Qspectre /sdl" install
if %ERRORLEVEL% NEQ 0 goto :error
::remove cmake files including local build path information
rd /S /Q %BOOST_INSTALL_DIR%\lib\cmake
Expand Down

0 comments on commit b19db15

Please sign in to comment.