vcpkg/ports/upb/fix-uwp.patch

29 lines
830 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
2020-08-23 13:25:20 +08:00
index eda6a72..386966f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,10 @@ elseif(UNIX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
endif()
+if (MSVC)
+ add_compile_options(/wd4146 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
enable_testing()
2020-08-23 13:25:20 +08:00
add_library(port
diff --git a/upb/json_decode.c b/upb/json_decode.c
index 953d238..5185ffd 100644
--- a/upb/json_decode.c
+++ b/upb/json_decode.c
@@ -1138,7 +1138,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
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)) {