# HG changeset patch # User Chris Cannam # Date 1434448494 -3600 # Node ID 7d59dd1ba5ded506b583d0e780e2e2204cc03c08 # Parent 14b34e85523b3748f87d55d67d2abb664efe24e3 Add -Wextra, fix a couple of warnings it throws up diff -r 14b34e85523b -r 7d59dd1ba5de Makefile.in --- a/Makefile.in Tue Jun 16 10:26:12 2015 +0100 +++ b/Makefile.in Tue Jun 16 10:54:54 2015 +0100 @@ -138,6 +138,7 @@ $(HOSTSDKDIR)/PluginSummarisingAdapter.h \ $(HOSTSDKDIR)/PluginWrapper.h \ $(HOSTSDKDIR)/hostguard.h \ + $(HOSTSDKDIR)/host-c.h \ $(HOSTSDKDIR)/vamp-hostsdk.h SDK_OBJECTS = \ @@ -155,6 +156,7 @@ $(HOSTSDKSRCDIR)/PluginLoader.o \ $(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \ $(HOSTSDKSRCDIR)/PluginWrapper.o \ + $(HOSTSDKSRCDIR)/host-c.o \ $(HOSTSDKSRCDIR)/acsymbols.o SDK_STATIC = \ diff -r 14b34e85523b -r 7d59dd1ba5de configure --- a/configure Tue Jun 16 10:26:12 2015 +0100 +++ b/configure Tue Jun 16 10:54:54 2015 +0100 @@ -3950,11 +3950,11 @@ if test "x$GCC" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; - *) CXXFLAGS="$CXXFLAGS -fPIC -Wall" ;; + *) CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra" ;; esac case " $CFLAGS " in *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; - *) CFLAGS="$CFLAGS -fPIC -Wall" ;; + *) CFLAGS="$CFLAGS -fPIC -Wall -Wextra" ;; esac fi diff -r 14b34e85523b -r 7d59dd1ba5de configure.ac --- a/configure.ac Tue Jun 16 10:26:12 2015 +0100 +++ b/configure.ac Tue Jun 16 10:54:54 2015 +0100 @@ -44,11 +44,11 @@ if test "x$GCC" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; - *) CXXFLAGS="$CXXFLAGS -fPIC -Wall" ;; + *) CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra" ;; esac case " $CFLAGS " in *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; - *) CFLAGS="$CFLAGS -fPIC -Wall" ;; + *) CFLAGS="$CFLAGS -fPIC -Wall -Wextra" ;; esac fi changequote([,])dnl diff -r 14b34e85523b -r 7d59dd1ba5de examples/FixedTempoEstimator.cpp --- a/examples/FixedTempoEstimator.cpp Tue Jun 16 10:26:12 2015 +0100 +++ b/examples/FixedTempoEstimator.cpp Tue Jun 16 10:54:54 2015 +0100 @@ -431,7 +431,7 @@ if (k0 >= 0 && k0 < int(n/2)) { - int kmax = 0, kmin = 0; + int kmax = 0; float kvmax = 0, kvmin = 0; bool have = false; @@ -439,8 +439,8 @@ if (k < 0 || k >= n/2) continue; - if (!have || (m_r[k] > kvmax)) { kmax = k; kvmax = m_r[k]; } - if (!have || (m_r[k] < kvmin)) { kmin = k; kvmin = m_r[k]; } + if (!have || (m_r[k] > kvmax)) { kvmax = m_r[k]; kmax = k; } + if (!have || (m_r[k] < kvmin)) { kvmin = m_r[k]; } have = true; } diff -r 14b34e85523b -r 7d59dd1ba5de examples/PowerSpectrum.cpp --- a/examples/PowerSpectrum.cpp Tue Jun 16 10:26:12 2015 +0100 +++ b/examples/PowerSpectrum.cpp Tue Jun 16 10:54:54 2015 +0100 @@ -89,7 +89,7 @@ } bool -PowerSpectrum::initialise(size_t channels, size_t stepSize, size_t blockSize) +PowerSpectrum::initialise(size_t channels, size_t, size_t blockSize) { if (channels < getMinChannelCount() || channels > getMaxChannelCount()) return false; @@ -133,7 +133,7 @@ } PowerSpectrum::FeatureSet -PowerSpectrum::process(const float *const *inputBuffers, Vamp::RealTime timestamp) +PowerSpectrum::process(const float *const *inputBuffers, Vamp::RealTime) { FeatureSet fs; diff -r 14b34e85523b -r 7d59dd1ba5de examples/SpectralCentroid.cpp --- a/examples/SpectralCentroid.cpp Tue Jun 16 10:26:12 2015 +0100 +++ b/examples/SpectralCentroid.cpp Tue Jun 16 10:54:54 2015 +0100 @@ -143,7 +143,7 @@ } SpectralCentroid::FeatureSet -SpectralCentroid::process(const float *const *inputBuffers, Vamp::RealTime timestamp) +SpectralCentroid::process(const float *const *inputBuffers, Vamp::RealTime) { if (m_stepSize == 0) { cerr << "ERROR: SpectralCentroid::process: " diff -r 14b34e85523b -r 7d59dd1ba5de src/vamp-sdk/PluginAdapter.cpp --- a/src/vamp-sdk/PluginAdapter.cpp Tue Jun 16 10:26:12 2015 +0100 +++ b/src/vamp-sdk/PluginAdapter.cpp Tue Jun 16 10:54:54 2015 +0100 @@ -588,7 +588,7 @@ } void -PluginAdapterBase::Impl::vampReleaseFeatureSet(VampFeatureList *fs) +PluginAdapterBase::Impl::vampReleaseFeatureSet(VampFeatureList *) { #ifdef DEBUG_PLUGIN_ADAPTER std::cerr << "PluginAdapterBase::Impl::vampReleaseFeatureSet" << std::endl;