diff --git a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h index be31d63d9bf528ffb2bbf78715910e3270b06254..b884127a87c36ee8d65acc77375a1fa527d70b6a 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 d84d5c689e03251e4b93b76f51dee25a974061bd..6a372e92ff60ba620adc3b7c7cb2b34ada32b2ad 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 c6cf163b90e492335231c1309ac415e158f49962..4228f1a19f8ad97bae1a136e8f512559323955f8 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 33f2988f35a79fafa65ea44ede4422cddd24a1ab..8351b8b3ba8ad130f377cd665d14f606b69c6dd5 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 ddeafe237a92466fc7735896cad9abedacb0f0e8..67094f1dc18f4f076e516d49b1926868490426ca 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 ba5ac864603ea009cd523a93c9c0299f450f58c2..45c682d09a7faabb20d8205d854f4f45b3952426 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 8a5d68a0f77d078d79a7900b9a96e80396d132d9..d135871497ea8e9e96eaeb8d052f89e3bf8b6964 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 859b8f876a03de974bbdf8032534e008e7c57a11..79f37352384f2ed3fe2fe1de91a432cbb1a3268b 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 e3038c9b275de611164eadf952c1b1517b16f358..e141ebc5afc6fce8cfaba4e4fd75bc097785677d 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 7c3815e228ab4c2b6a5cb0ad28dda8a3bf57d0f1..2564d974b6813097ddd465ef787fdfac62370447 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 5881a50b4320ee5dbc7fa0e6d1449ec2cda47e34..48f02003629d14a7d1e0052baacc77e9373c3be3 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 475cd33876e5b57a76f196a8295a8900955fe7b1..742b70bea342b78482376e87e60bd41803852a45 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 bd6016b98611542d216abb622c70507605ae5d3f..d567db4174334bf6323bdbff2f88e26c7c843e73 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 e03d7460919c960973f705c4938e5c2bbcf22904..000e31dd738e856dd0fb6c4f57dcda41582ce540 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 c412755bb39146edb8964a07062d50422a86f471..c249462a3919bf33fe72cf87c3279359c652bb5b 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 58b395ab81e383eb0f9a95c8836051a6ebf8b015..fc665e2b807e99e810be40822992e5e4b0ff3874 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 ea5c8e67f1c736116a1b7af1ba05dbd18c9297d7..b18061bfaaafd53df6c725b2c1b7d81a21f36dcb 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 a6cbf33693fcf6afa33df7c4dc2f69c4be40253b..d9656c6eb2fc0ff6baa8dc1cb4d061207ac8ca0c 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 c62d588d214ce84f93d809418d8d4bbb9452bd63..b437c5d745026601cfda61489f7cb7d1a524ae41 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 73a9ed41f54d834042b291028b8a66dce8c1cfa9..d7365a9d4452857cf0cf6f440bdced8a06153ed5 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 188c79348cc5d4efd103658fa52d6388d91474b1..0da7381c9804babe85cd86660de09575692ec3e9 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()) {