From 16fce9b6ea2561dd7eb5ee474225ae4125ebda6d Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-hx Date: Tue, 13 Feb 2024 16:49:51 -0800 Subject: [PATCH] fix --- CMakeLists.txt | 4 ++-- cpp/FileTransferAgent.cpp | 1 - include/snowflake/Simba_CRTFunctionSafe.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 794ebc9413..35e50e0c79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,8 +69,8 @@ endif () set(CMAKE_VERBOSE_MAKEFILE ON) if (UNIX) # Linux and OSX - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -std=gnu99 -g -fPIC -Wno-error=deprecated-declarations -D_LARGEFILE64_SOURCE ${MOCK_OBJECT_WRAPPER_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -std=gnu++11 -fPIC -Wno-error=deprecated-declarations ${MOCK_OBJECT_WRAPPER_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -std=gnu99 -g -fPIC -Werror -Wno-error=deprecated-declarations -D_LARGEFILE64_SOURCE ${MOCK_OBJECT_WRAPPER_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -std=gnu++11 -fPIC -Werror -Wno-error=deprecated-declarations ${MOCK_OBJECT_WRAPPER_FLAGS}") else() # Windows set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /ZH:SHA_256 /guard:cf /Qspectre /sdl") diff --git a/cpp/FileTransferAgent.cpp b/cpp/FileTransferAgent.cpp index b5b89e8673..223bcf6809 100755 --- a/cpp/FileTransferAgent.cpp +++ b/cpp/FileTransferAgent.cpp @@ -849,7 +849,6 @@ RemoteStorageRequestOutcome Snowflake::Client::FileTransferAgent::downloadSingle } catch (...) { std::string err = "Could not open file " + fileMetadata->destPath + " to downoad"; - sf_strerror(errno);//test code, will remove soon before merging char* str_error = sf_strerror_s(errno, strerr_buf, sizeof(strerr_buf)); CXX_LOG_DEBUG("Could not open file %s to downoad: %s", fileMetadata->destPath.c_str(), str_error); diff --git a/include/snowflake/Simba_CRTFunctionSafe.h b/include/snowflake/Simba_CRTFunctionSafe.h index 66fa8be012..cc988b4dcb 100644 --- a/include/snowflake/Simba_CRTFunctionSafe.h +++ b/include/snowflake/Simba_CRTFunctionSafe.h @@ -33,7 +33,7 @@ extern "C" { #if defined(_MSC_VER) #define SF_MACRO_DEPRECATED_WARNING(MSG) __pragma(message ( __FILE__ "(" MACRO_TO_STRING(__LINE__) ") : warning C4996: " MSG)) #else -#define SF_MACRO_DEPRECATED_WARNING(MSG) _Pragma(MACRO_TO_STRING(GCC warning OLD " "is deprecated, please use NEW instead.)) +#define SF_MACRO_DEPRECATED_WARNING(MSG) _Pragma(MACRO_TO_STRING(GCC warning MSG)) #endif // sf_getenv and sf_strerror is unsafe and deprecated.