From 7136098c3c6433b203fd84f77dc4c83c8389806d Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 7 Nov 2017 22:19:56 -0600 Subject: [PATCH] Suppress unnecessary deprecation warnings Disable warnings when compiling the implementations of deprecated classes and functions. Removes the unused USAGE_DEPRECATED and USAGE_ERROR macros from pvData.h which aren't visible outside of it anyway. --- src/misc/executor.cpp | 5 +++++ src/misc/timeFunction.cpp | 7 ++++++- src/pv/pvData.h | 11 ----------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/misc/executor.cpp b/src/misc/executor.cpp index 93e4a9a..fc9453b 100644 --- a/src/misc/executor.cpp +++ b/src/misc/executor.cpp @@ -16,6 +16,11 @@ #include #include +// Suppress deprecation warnings for the implementation +#include +#undef EPICS_DEPRECATED +#define EPICS_DEPRECATED + #define epicsExportSharedSymbols #include diff --git a/src/misc/timeFunction.cpp b/src/misc/timeFunction.cpp index 012061e..5a9a361 100644 --- a/src/misc/timeFunction.cpp +++ b/src/misc/timeFunction.cpp @@ -14,12 +14,17 @@ #include +// Suppress deprecation warnings for the implementation +#include +#undef EPICS_DEPRECATED +#define EPICS_DEPRECATED + #define epicsExportSharedSymbols #include #include #include -namespace epics { namespace pvData { +namespace epics { namespace pvData { TimeFunction::TimeFunction(TimeFunctionRequesterPtr const &requester) : requester(requester) {} diff --git a/src/pv/pvData.h b/src/pv/pvData.h index 66e49f4..38f6909 100644 --- a/src/pv/pvData.h +++ b/src/pv/pvData.h @@ -33,14 +33,6 @@ typedef class std::ios std::ios_base; #endif -#define USAGE_DEPRECATED EPICS_DEPRECATED - -#if defined(__GNUC__) && !(defined(vxWorks) && !defined(_WRS_VXWORKS_MAJOR)) -#define USAGE_ERROR(MSG) __attribute__((error(MSG))) -#else -#define USAGE_ERROR(MSG) { throw std::runtime_error(MSG); } -#endif - /* C++11 keywords @code struct Base { @@ -1677,9 +1669,6 @@ namespace std{ epicsShareExtern std::ostream& operator<<(std::ostream& o, const epics::pvData::PVField *ptr); } -#undef USAGE_DEPRECATED -#undef USAGE_ERROR - #endif /* PVDATA_H */ /** @page Overview Documentation