From de9535b96172ae0bb98bf623337964a303bbaa9c Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 12 Feb 2020 12:20:44 +0100 Subject: [PATCH] Suppress wxWidgets code analysis warnings Rather than addressing numerous code analysis warnings Microsoft Visual Studio 2019 reports for wxWidgets upstream, disable code analysis for the time being. But only for the wxWidgets part. We still want to know what the code analysis has to say about our code. Signed-off-by: Simon Rozman --- UpdCheck/pch.h | 3 +++ UpdPublish/pch.h | 3 +++ UpdSignXML/pch.h | 3 +++ Updater/include/Updater/chkthread.h | 3 +++ Updater/include/Updater/common.h | 6 +++++- Updater/src/pch.h | 3 +++ 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/UpdCheck/pch.h b/UpdCheck/pch.h index fa433cd..93ea101 100644 --- a/UpdCheck/pch.h +++ b/UpdCheck/pch.h @@ -21,6 +21,8 @@ #include +#pragma warning(push) +#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS) #include #include #include @@ -28,5 +30,6 @@ #include #include #include +#pragma warning(pop) #include diff --git a/UpdPublish/pch.h b/UpdPublish/pch.h index 52c43c1..99cd93b 100644 --- a/UpdPublish/pch.h +++ b/UpdPublish/pch.h @@ -23,10 +23,13 @@ #include "UpdPublish.h" +#pragma warning(push) +#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS) #include #include #include #include +#pragma warning(pop) #include #include diff --git a/UpdSignXML/pch.h b/UpdSignXML/pch.h index e54ab51..091045a 100644 --- a/UpdSignXML/pch.h +++ b/UpdSignXML/pch.h @@ -23,10 +23,13 @@ #include "UpdSignXML.h" +#pragma warning(push) +#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS) #include #include #include #include +#pragma warning(pop) #include #include diff --git a/Updater/include/Updater/chkthread.h b/Updater/include/Updater/chkthread.h index 80243ed..579bdda 100644 --- a/Updater/include/Updater/chkthread.h +++ b/Updater/include/Updater/chkthread.h @@ -21,12 +21,15 @@ #include "common.h" +#pragma warning(push) +#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS) #include #include #include #include #include #include +#pragma warning(pop) #include diff --git a/Updater/include/Updater/common.h b/Updater/include/Updater/common.h index 4f4fbb6..1ff66be 100644 --- a/Updater/include/Updater/common.h +++ b/Updater/include/Updater/common.h @@ -22,7 +22,6 @@ #include "../../../../include/UpdaterCfg.h" - // // Resource IDs // @@ -30,6 +29,11 @@ #if !defined(RC_INVOKED) && !defined(MIDL_PASS) +#include +#ifndef WXWIDGETS_CODE_ANALYSIS_WARNINGS +#define WXWIDGETS_CODE_ANALYSIS_WARNINGS ALL_CODE_ANALYSIS_WARNINGS 26812 +#endif + /// /// Public function calling convention /// diff --git a/Updater/src/pch.h b/Updater/src/pch.h index ba14bcf..034143b 100644 --- a/Updater/src/pch.h +++ b/Updater/src/pch.h @@ -21,12 +21,15 @@ #include "../include/Updater/chkthread.h" +#pragma warning(push) +#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS) #include #include #include #include #include #include +#pragma warning(pop) #include #include