From 2fe4ec52eba0d17ddce9068352824322ab47e938 Mon Sep 17 00:00:00 2001
From: Samuel Jackson <samueljackson@outlook.com>
Date: Thu, 26 Jul 2018 16:59:41 +0100
Subject: [PATCH] Fix issues with build server

---
 .../Kernel/inc/MantidKernel/PropertyHelper.h  |  4 +++
 .../inc/MantidKernel/WarningSuppressions.h    | 29 ++++---------------
 .../mantid/api/src/Exports/Algorithm.cpp      |  4 +--
 .../api/src/Exports/AlgorithmFactory.cpp      |  4 +--
 .../api/src/Exports/AlgorithmManager.cpp      |  4 +--
 .../mantid/api/src/Exports/Axis.cpp           |  4 +--
 .../api/src/Exports/CompositeFunction.cpp     |  4 +--
 .../mantid/api/src/Exports/ExperimentInfo.cpp |  4 +--
 .../mantid/api/src/Exports/FileFinder.cpp     |  4 +--
 .../mantid/api/src/Exports/IFunction.cpp      |  4 +--
 .../api/src/Exports/MatrixWorkspace.cpp       |  4 +--
 .../mantid/api/src/Exports/Run.cpp            |  4 +--
 .../mantid/api/src/Exports/Workspace.cpp      |  4 +--
 .../api/src/Exports/WorkspaceFactory.cpp      |  4 +--
 .../mantid/geometry/src/Exports/Component.cpp |  4 +--
 .../geometry/src/Exports/Goniometer.cpp       |  4 +--
 .../kernel/src/Exports/ConfigService.cpp      |  4 +--
 .../mantid/kernel/src/Exports/Property.cpp    |  4 +--
 .../mantid/kernel/src/Exports/Statistics.cpp  | 16 +++++-----
 .../WorkspaceCreationHelperModule.cpp         |  4 +--
 MantidPlot/src/PythonScript.cpp               |  4 +--
 21 files changed, 53 insertions(+), 68 deletions(-)

diff --git a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h
index be31d63d9bf..b884127a87c 100644
--- a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h
+++ b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h
@@ -124,11 +124,14 @@ std::string toPrettyString(
   }
   return Strings::shorten(retVal, maxLength);
 }
+
 GNU_DIAG_OFF("unused-function")
+
 /** Explicit specialization for a property of type std::vector<bool>.
 *   This will catch Vectors of char, double, float etc.
 *   This simply concatenates the values using a delimiter
 */
+
 template <>
 std::string toPrettyString(
     const std::vector<bool> &value, size_t maxLength, bool collapseLists,
@@ -139,6 +142,7 @@ std::string toPrettyString(
   return Strings::shorten(Strings::join(value.begin(), value.end(), delimiter),
                           maxLength);
 }
+
 GNU_DIAG_ON("unused-function")
 
 /// Specialization for a property of type std::vector<std::vector>.
diff --git a/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h b/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h
index d84d5c689e0..6a372e92ff6 100644
--- a/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h
+++ b/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h
@@ -44,19 +44,8 @@
 #if defined(GCC_VERSION) || defined(CLANG_VERSION)
 // how to use a pragma in a macro
 #define PRAGMA(x) _Pragma(#x)
-
 // things to make the macros clearer
-#define GNU_DIAG_STR(s) #s
-// undefine definition from Poco 1.6
-#ifdef GNU_DIAG_JOINSTR
-#undef GNU_DIAG_JOINSTR
-#endif
-#define GNU_DIAG_JOINSTR(x, y) GNU_DIAG_STR(x##y)
 #define GNU_DIAG_MAKE_WARNING(x) "-W" x
-// undefine definition from Poco 1.6
-#ifdef GNU_DIAG_DO_PRAGMA
-#undef GNU_DIAG_DO_PRAGMA
-#endif
 #define GNU_DIAG_DO_PRAGMA(x) _Pragma(#x)
 
 #if defined(GCC_VERSION)
@@ -78,20 +67,12 @@
 // note that we turn off unknown warnings here as well so that we can use the
 // same macro for GCC and clang.
 // clang-format off
-#if GCC_VERSION >= 40600 // GCC 4.6.0
 #define GNU_DIAG_OFF(x)                                                          \
   GNU_DIAG_PRAGMA(push)                                                          \
-  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning"))                     \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("pragmas"))                      \
   GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING(x))
 #define GNU_DIAG_ON(x) GNU_DIAG_PRAGMA(pop)
-#else
-#define GNU_DIAG_OFF(x)                                                          \
-  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning"))                     \
-  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING(x))
-#define GNU_DIAG_ON(x)                                                           \
-  GNU_DIAG_PRAGMA(warning GNU_DIAG_MAKE_WARNING("unknown-warning"))                     \
-  GNU_DIAG_PRAGMA(warning GNU_DIAG_MAKE_WARNING(x))
-#endif
+
 // clang-format on
 
 #elif defined(CLANG_VERSION) && CLANG_VERSION >= 306
@@ -101,18 +82,18 @@
 // clang-format off
 #define GNU_DIAG_OFF(x)                                                         \
   GNU_DIAG_PRAGMA(push)                                                         \
-  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning-option"))        \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-pragmas"))             \
+  GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING("unknown-warning-option"))      \
   GNU_DIAG_PRAGMA(ignored GNU_DIAG_MAKE_WARNING(x))
 #define GNU_DIAG_ON(x) GNU_DIAG_PRAGMA(pop)
 // clang-format on
+#endif
 #else
 // neither clang or GCC
 #define GNU_DIAG_OFF(x)
 #define GNU_DIAG_ON(x)
 #endif
 
-#endif
-
 // Defining this macro separately since clang-tidy tries to add spaces around
 // the hyphen and we use it in a lot of test files.
 // clang-format off
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp
index c6cf163b90e..4228f1a19f8 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp
@@ -59,7 +59,7 @@ using declarePropertyType4 = void (*)(boost::python::object &,
                                       const std::string &,
                                       const boost::python::object &, const int);
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -72,7 +72,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(declarePropertyType3_Overload,
                                 PythonAlgorithm::declarePyAlgProperty, 4, 5)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 /**
  * Map a CancelException to a Python KeyboardInterupt
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
index 33f2988f35a..8351b8b3ba8 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp
@@ -118,7 +118,7 @@ void subscribe(AlgorithmFactoryImpl &self, const boost::python::object &obj) {
 }
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -127,7 +127,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(existsOverloader, exists, 1, 2)
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 ///@endcond
 }
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp
index ddeafe237a9..67094f1dc18 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp
@@ -57,7 +57,7 @@ boost::python::list runningInstancesOf(AlgorithmManagerImpl &self,
 ///@cond
 //------------------------------------------------------------------------------------------------------
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -69,7 +69,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createUnmanaged_overloads,
                                        2)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 ///@endcond
 }
 
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp
index ba5ac864603..45c682d09a7 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp
@@ -30,7 +30,7 @@ namespace {
 
 //------------------------------- Overload macros ---------------------------
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -40,7 +40,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Axis_getValue, Axis::getValue, 1, 2)
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 /**
  * Extract the axis values as a sequence. A numpy array is used if the
  * data is numerical or a simple python list is used if the data is a string
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp
index 8a5d68a0f77..d135871497e 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp
@@ -20,14 +20,14 @@ using getParameterType2 =
 using setParameterType2 = void (CompositeFunction::*)(const std::string &,
                                                       const double &, bool);
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 GNU_DIAG_OFF("conversion")
 
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(setParameterType2_Overloads,
                                        setParameter, 2, 3)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 } // namespace
 
 void export_CompositeFunction() {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp
index 859b8f876a0..79f37352384 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp
@@ -19,7 +19,7 @@ using namespace boost::python;
 GET_POINTER_SPECIALIZATION(ExperimentInfo)
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -28,7 +28,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(getInstrumentFilename_Overload,
                                 ExperimentInfo::getInstrumentFilename, 1, 2)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 void export_ExperimentInfo() {
   register_ptr_to_python<boost::shared_ptr<ExperimentInfo>>();
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp
index e3038c9b275..e141ebc5afc 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp
@@ -10,7 +10,7 @@ using namespace boost::python;
 
 namespace {
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -19,7 +19,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getFullPathOverloader, getFullPath, 1, 2)
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 }
 
 void export_FileFinder() {
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp
index 7c3815e228a..2564d974b68 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp
@@ -51,7 +51,7 @@ double getError(IFunction &self, std::string const &name) {
 // setProperty(index,value,explicit)
 using setParameterType1 = void (IFunction::*)(size_t, const double &, bool);
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -74,7 +74,7 @@ using removeTieByName = void (IFunction::*)(const std::string &);
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 ///@endcond
 }
 
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp
index 5881a50b432..48f02003629 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp
@@ -50,7 +50,7 @@ using return_readwrite_numpy =
 
 //------------------------------- Overload macros ---------------------------
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -59,7 +59,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(MatrixWorkspace_binIndexOfOverloads,
                                        MatrixWorkspace::binIndexOf, 1, 2)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 /**
  * Set the values from an python array-style object into the given spectrum in
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp
index 475cd33876e..742b70bea34 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp
@@ -116,7 +116,7 @@ bpl::list keys(Run &self) {
 }
 }
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -125,7 +125,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(integrateProtonCharge_Overload,
                                        integrateProtonCharge, 0, 1)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 void export_Run() {
   // Pointer
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp
index bd6016b9861..d567db41743 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp
@@ -20,7 +20,7 @@ GET_POINTER_SPECIALIZATION(Workspace)
 namespace {
 ///@cond
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -28,7 +28,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Workspace_isDirtyOverloads,
                                        Workspace::isDirty, 0, 1)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 ///@endcond
 }
diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp
index e03d7460919..000e31dd738 100644
--- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp
+++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp
@@ -47,7 +47,7 @@ Workspace_sptr createFromParentPtr(WorkspaceFactoryImpl &self,
 
 /// Overload generator for create
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -59,7 +59,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(createPeaks_Overload, createPeaks, 0, 1)
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 }
 
 void export_WorkspaceFactory() {
diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp
index c412755bb39..c249462a391 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp
@@ -9,7 +9,7 @@ using namespace boost::python;
 
 namespace {
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -45,7 +45,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParamDescription,
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 }
 void export_Component() {
   class_<Component, bases<IComponent>, boost::noncopyable>("Component", no_init)
diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp
index 58b395ab81e..fc665e2b807 100644
--- a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp
+++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp
@@ -17,7 +17,7 @@ namespace //<unnamed>
     {
 ///@cond
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -26,7 +26,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getEulerAngles_overloads,
                                        Goniometer::getEulerAngles, 0, 1)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 ///@endcond
 
 /// Set the U vector via a numpy array
diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp
index ea5c8e67f1c..b18061bfaaa 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp
@@ -33,7 +33,7 @@ std::string getStringUsingCache(ConfigServiceImpl &self,
 }
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -45,7 +45,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getString_Overload, getString, 1, 2)
 
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 }
 
 void export_ConfigService() {
diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp
index a6cbf33693f..d9656c6eb2f 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp
@@ -25,7 +25,7 @@ using namespace boost::python;
 
 GET_POINTER_SPECIALIZATION(Property)
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -35,7 +35,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(valueAsPrettyStrOverloader,
                                        valueAsPrettyStr, 0, 2)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 void export_Property() {
   register_ptr_to_python<Property *>();
diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp
index c62d588d214..b437c5d7450 100644
--- a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp
+++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp
@@ -98,7 +98,7 @@ Statistics getStatisticsNumpy(const NumPy::NdArray &data,
 }
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -108,7 +108,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(getStatisticsOverloads, getStatisticsNumpy, 1,
                                 2)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 //============================ Z score
 //============================================
 
@@ -158,7 +158,7 @@ std::vector<double> getModifiedZscoreNumpy(const NumPy::NdArray &data,
 }
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -168,7 +168,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(getModifiedZscoreOverloads,
                                 getModifiedZscoreNumpy, 1, 2)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 //============================ getMoments
 //============================================
@@ -220,7 +220,7 @@ std::vector<double> getMomentsAboutOriginNumpy(const NumPy::NdArray &indep,
 }
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -229,7 +229,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(getMomentsAboutOriginOverloads,
                                 getMomentsAboutOriginNumpy, 2, 3)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 /**
  * Proxy for @see Mantid::Kernel::getMomentsAboutMean so that it can accept
  * numpy arrays
@@ -242,7 +242,7 @@ std::vector<double> getMomentsAboutMeanNumpy(const NumPy::NdArray &indep,
 }
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -251,7 +251,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(getMomentsAboutMeanOverloads,
                                 getMomentsAboutMeanNumpy, 2, 3)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 ///@endcond
 }
diff --git a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
index 73a9ed41f54..d7365a9d445 100644
--- a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
+++ b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelperModule.cpp
@@ -23,7 +23,7 @@ using namespace Mantid::PythonInterface::Policies;
 using namespace WorkspaceCreationHelper;
 
 GNU_DIAG_OFF("unknown-pragmas")
-GNU_DIAG_OFF("unused-local-typdef")
+GNU_DIAG_OFF("unused-local-typedef")
 // Ignore -Wconversion warnings coming from boost::python
 // Seen with GCC 7.1.1 and Boost 1.63.0
 GNU_DIAG_OFF("conversion")
@@ -38,7 +38,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(
     create2DWorkspaceWithRectangularInstrument, 3, 3)
 GNU_DIAG_ON("conversion")
 GNU_DIAG_ON("unknown-pragmas")
-GNU_DIAG_ON("unused-local-typdef")
+GNU_DIAG_ON("unused-local-typedef")
 
 BOOST_PYTHON_MODULE(WorkspaceCreationHelper) {
   using namespace boost::python;
diff --git a/MantidPlot/src/PythonScript.cpp b/MantidPlot/src/PythonScript.cpp
index 188c79348cc..0da7381c980 100644
--- a/MantidPlot/src/PythonScript.cpp
+++ b/MantidPlot/src/PythonScript.cpp
@@ -538,13 +538,13 @@ QVariant PythonScript::evaluateImpl() {
       qret = QVariant(PyFloat_AS_DOUBLE(number));
       Py_DECREF(number);
     }
+    GNU_DIAG_OFF("parentheses-equality")
   }
   /* bool */
-  GNU_DIAG_OFF("parentheses-equality")
   else if (PyBool_Check(pyret)) {
-    GNU_DIAG_ON("parentheses-equality")
     qret = QVariant(pyret == Py_True);
   }
+  GNU_DIAG_ON("parentheses-equality")
   // could handle advanced types (such as PyList->QValueList) here if needed
   /* fallback: try to convert to (unicode) string */
   if (!qret.isValid()) {
-- 
GitLab