From 4d8499945279ab7dbe418d91a0f88407fc1ca922 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 15 Jan 2018 19:49:36 +0000 Subject: [PATCH] dnn: protobuf build warnings --- 3rdparty/protobuf/CMakeLists.txt | 2 ++ modules/dnn/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/3rdparty/protobuf/CMakeLists.txt b/3rdparty/protobuf/CMakeLists.txt index fd5bb93bd0..4e556ebd65 100644 --- a/3rdparty/protobuf/CMakeLists.txt +++ b/3rdparty/protobuf/CMakeLists.txt @@ -11,6 +11,8 @@ if(MSVC) ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702 /wd4456 /wd4457 /wd4065 /wd4310 /wd4661 /wd4506 + /wd4701 /wd4703 # potentially uninitialized local/pointer variable 'value' used + /wd4505 # unreferenced local function has been removed ) else() #NOTE: -Wno-invalid-offsetof was used as solution for invalid offset warning on protobuf #3450 diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index f3ebb36dac..985a63ba31 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -52,7 +52,10 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations /wd4125 /wd4267 /wd4127 /wd4244 /wd4512 /wd4702 /wd4456 /wd4510 /wd4610 /wd4800 + /wd4701 /wd4703 # potentially uninitialized local/pointer variable 'value' used + /wd4505 # unreferenced local function has been removed -wd858 -wd2196 + -Winvalid-offsetof # Apple Clang (attr_value.pb.cc) ) if(PROTOBUF_UPDATE_FILES)