diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt index dc2f8092762..38203a07911 100644 --- a/extra/wolfssl/CMakeLists.txt +++ b/extra/wolfssl/CMakeLists.txt @@ -126,7 +126,8 @@ endif() # Silence some warnings if(MSVC) # truncation warnings - target_compile_options(wolfssl PRIVATE $<$:/wd4244>) + target_compile_options(wolfssl PRIVATE $<$:/wd4244 /wd5287 /wd5286>) + target_compile_definitions(wolfssl PUBLIC WC_NO_STATIC_ASSERT) if(CMAKE_C_COMPILER_ID MATCHES Clang) target_compile_options(wolfssl PRIVATE $<$:-Wno-incompatible-function-pointer-types>) endif() diff --git a/strings/json_lib.c b/strings/json_lib.c index 2090bd5d9ab..b6b92c3ffb2 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1874,13 +1874,13 @@ static enum json_types smart_read_value(json_engine_t *je, *value_len= (int) ((char *) je->s.c_str - *value); } - compile_time_assert((int) JSON_VALUE_OBJECT == (int) JSV_OBJECT); - compile_time_assert((int) JSON_VALUE_ARRAY == (int) JSV_ARRAY); - compile_time_assert((int) JSON_VALUE_STRING == (int) JSV_STRING); - compile_time_assert((int) JSON_VALUE_NUMBER == (int) JSV_NUMBER); - compile_time_assert((int) JSON_VALUE_TRUE == (int) JSV_TRUE); - compile_time_assert((int) JSON_VALUE_FALSE == (int) JSV_FALSE); - compile_time_assert((int) JSON_VALUE_NULL == (int) JSV_NULL); + compile_time_assert((enum json_types)JSON_VALUE_OBJECT == JSV_OBJECT); + compile_time_assert((enum json_types)JSON_VALUE_ARRAY == JSV_ARRAY); + compile_time_assert((enum json_types)JSON_VALUE_STRING == JSV_STRING); + compile_time_assert((enum json_types)JSON_VALUE_NUMBER == JSV_NUMBER); + compile_time_assert((enum json_types)JSON_VALUE_TRUE == JSV_TRUE); + compile_time_assert((enum json_types)JSON_VALUE_FALSE == JSV_FALSE); + compile_time_assert((enum json_types)JSON_VALUE_NULL == JSV_NULL); return (enum json_types) je->value_type; diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt index 85810840273..e7987cb9c2f 100644 --- a/vio/CMakeLists.txt +++ b/vio/CMakeLists.txt @@ -20,3 +20,4 @@ ADD_DEFINITIONS(${SSL_DEFINES}) SET(VIO_SOURCES vio.c viosocket.c viossl.c viopipe.c viosslfactories.c) ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES}) TARGET_LINK_LIBRARIES(vio ${LIBSOCKET}) +TARGET_LINK_LIBRARIES(vio ${SSL_LIBRARIES})