Skip to content

Commit 0c1ebba

Browse files
committed
fix
1 parent ad8ccd4 commit 0c1ebba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Intel)
5151
endif()
5252

5353
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
54-
add_compile_options(/EHsc /MP /bigobj /W4 /WX)
54+
add_compile_options(/EHsc /MP /bigobj /W4 /WX /wd4996)
5555
set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO)
5656
if (XTL_DISABLE_EXCEPTIONS)
5757
add_compile_options(/EHs-c-)

test/test_xbasic_fixed_string.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ namespace xtl
11701170
{
11711171
std::string s = "thisisatest";
11721172
char buf[16];
1173-
strncpy(buf, s.c_str(), sizeof(buf));
1173+
strcpy(buf, s.c_str());
11741174
numpy_string* x = reinterpret_cast<numpy_string*>(buf);
11751175

11761176
EXPECT_EQ(*x, s);

0 commit comments

Comments
 (0)