From 74d07e5ffc1a3a54902d635d76e4da6f3a75084e Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 22 Jul 2016 12:19:06 +0200 Subject: [PATCH] plugins/: unused attribute only for gcc --- plugins/MelEnergy.cpp | 2 +- plugins/Mfcc.cpp | 2 +- plugins/SpecDesc.cpp | 2 +- plugins/Types.h | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/MelEnergy.cpp b/plugins/MelEnergy.cpp index a69b8be..7641e23 100644 --- a/plugins/MelEnergy.cpp +++ b/plugins/MelEnergy.cpp @@ -197,7 +197,7 @@ MelEnergy::getOutputDescriptors() const MelEnergy::FeatureSet MelEnergy::process(const float *const *inputBuffers, - __attribute__((unused)) Vamp::RealTime timestamp) + UNUSED Vamp::RealTime timestamp) { FeatureSet returnFeatures; diff --git a/plugins/Mfcc.cpp b/plugins/Mfcc.cpp index fa632e7..1df5d32 100644 --- a/plugins/Mfcc.cpp +++ b/plugins/Mfcc.cpp @@ -208,7 +208,7 @@ Mfcc::getOutputDescriptors() const Mfcc::FeatureSet Mfcc::process(const float *const *inputBuffers, - __attribute__((unused)) Vamp::RealTime timestamp) + UNUSED Vamp::RealTime timestamp) { FeatureSet returnFeatures; diff --git a/plugins/SpecDesc.cpp b/plugins/SpecDesc.cpp index a23a732..3d446c8 100644 --- a/plugins/SpecDesc.cpp +++ b/plugins/SpecDesc.cpp @@ -205,7 +205,7 @@ SpecDesc::getOutputDescriptors() const SpecDesc::FeatureSet SpecDesc::process(const float *const *inputBuffers, - __attribute__((unused)) Vamp::RealTime timestamp) + UNUSED Vamp::RealTime timestamp) { for (size_t i = 0; i < m_stepSize; ++i) { fvec_set_sample(m_ibuf, inputBuffers[0][i], i); diff --git a/plugins/Types.h b/plugins/Types.h index e005a8a..ed04bb0 100644 --- a/plugins/Types.h +++ b/plugins/Types.h @@ -26,6 +26,13 @@ #ifndef _ONSET_TYPE_H_ #define _ONSET_TYPE_H_ +/** silence unused parameter warning by adding an attribute */ +#if defined(__GNUC__) +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif + // Note: the enum values in this header are ordered to match the Vamp // plugin parameter values in earlier versions of this plugin set, to // avoid breaking stored parameter settings that use the parameter's -- 2.11.0