plugins/: unused attribute only for gcc
authorPaul Brossier <piem@piem.org>
Fri, 22 Jul 2016 10:19:06 +0000 (12:19 +0200)
committerPaul Brossier <piem@piem.org>
Fri, 22 Jul 2016 10:19:06 +0000 (12:19 +0200)
plugins/MelEnergy.cpp
plugins/Mfcc.cpp
plugins/SpecDesc.cpp
plugins/Types.h

index a69b8be..7641e23 100644 (file)
@@ -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;
 
index fa632e7..1df5d32 100644 (file)
@@ -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;
 
index a23a732..3d446c8 100644 (file)
@@ -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);
index e005a8a..ed04bb0 100644 (file)
 #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