2021-04-24 01:40:07 +08:00
|
|
|
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
|
|
|
index a6b432f..003615e 100644
|
|
|
|
--- a/cmake/CMakeLists.txt
|
|
|
|
+++ b/cmake/CMakeLists.txt
|
|
|
|
@@ -59,6 +59,10 @@ elseif(UNIX)
|
2020-03-11 00:31:38 +08:00
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if (MSVC)
|
2021-04-27 01:27:45 +08:00
|
|
|
+ add_compile_options(/wd4146 /wd4703 -D_CRT_SECURE_NO_WARNINGS)
|
2020-03-11 00:31:38 +08:00
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
enable_testing()
|
2020-08-23 13:25:20 +08:00
|
|
|
|
2021-04-24 01:40:07 +08:00
|
|
|
add_library(port INTERFACE)
|
2020-08-23 13:25:20 +08:00
|
|
|
diff --git a/upb/json_decode.c b/upb/json_decode.c
|
2021-04-24 01:40:07 +08:00
|
|
|
index bb33744..1fadd26 100644
|
2020-08-23 13:25:20 +08:00
|
|
|
--- a/upb/json_decode.c
|
|
|
|
+++ b/upb/json_decode.c
|
2021-04-24 01:40:07 +08:00
|
|
|
@@ -1160,7 +1160,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
|
2020-08-23 13:25:20 +08:00
|
|
|
static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg,
|
|
|
|
const upb_msgdef *m) {
|
|
|
|
upb_msgval val;
|
|
|
|
- const upb_fielddef *f;
|
|
|
|
+ const upb_fielddef *f = NULL;
|
|
|
|
upb_msg *submsg;
|
|
|
|
|
|
|
|
switch (jsondec_peek(d)) {
|