From a9cdb5be5028aeb7f39afef69dabc34a0ed1a4e7 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Tue, 21 Apr 2020 16:30:47 -0700 Subject: [PATCH 1/3] Remove unneeded /WD flags on Windows --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c9d070f..d94583f2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) add_library(simdjson-flags INTERFACE) if(MSVC) target_compile_options(simdjson-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS) - target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4005 /wd4996 /wd4267 /wd4244 /wd4113) + target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4996 /wd4267 /wd4244) else() target_compile_options(simdjson-flags INTERFACE -fPIC) target_compile_options(simdjson-flags INTERFACE -Werror -Wall -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self) From 499a26b152cf724af634fb6316436c7d8fc0ce70 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Tue, 21 Apr 2020 16:56:13 -0700 Subject: [PATCH 2/3] Remove /D_CRT_SECURE_NO_WARNINGS on Windows --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d94583f2f..046d7114a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) # add_library(simdjson-flags INTERFACE) if(MSVC) - target_compile_options(simdjson-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS) + target_compile_options(simdjson-flags INTERFACE /nologo) target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4996 /wd4267 /wd4244) else() target_compile_options(simdjson-flags INTERFACE -fPIC) From 536fe28f8f9f3048855499ee3e2d4cacff29d92b Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 22 Apr 2020 12:46:55 -0400 Subject: [PATCH 3/3] Being explicit regarding the initialization of two member variables. (#765) --- src/generic/stage2_build_tape.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/stage2_build_tape.h b/src/generic/stage2_build_tape.h index 4dab3304c..1175eb818 100644 --- a/src/generic/stage2_build_tape.h +++ b/src/generic/stage2_build_tape.h @@ -105,8 +105,8 @@ public: const size_t len; const uint32_t* const structural_indexes; size_t next_structural; // next structural index - size_t idx; // location of the structural character in the input (buf) - uint8_t c; // used to track the (structural) character we are looking at + size_t idx{0}; // location of the structural character in the input (buf) + uint8_t c{0}; // used to track the (structural) character we are looking at }; struct structural_parser {