changeset 377:e43186ff8854

Fix some uninitialised members that Coverity otherwise complains about
author Chris Cannam
date Wed, 03 Sep 2014 12:14:39 +0100
parents 5ad35dc275c2
children 28e7aaed3292 656ce0eae135
files vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
diffstat 2 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vamp-sdk/Plugin.h	Thu Aug 07 20:30:36 2014 +0100
+++ b/vamp-sdk/Plugin.h	Wed Sep 03 12:14:39 2014 +0100
@@ -320,8 +320,16 @@
         bool hasDuration;
 
         OutputDescriptor() : // defaults for mandatory non-class-type members
-            hasFixedBinCount(false), hasKnownExtents(false), isQuantized(false),
-            sampleType(OneSamplePerStep), sampleRate(0), hasDuration(false) { }
+            hasFixedBinCount(false),
+            binCount(0),
+            hasKnownExtents(false),
+            minValue(0),
+            maxValue(0),
+            isQuantized(false),
+            quantizeStep(0),
+            sampleType(OneSamplePerStep), 
+            sampleRate(0), 
+            hasDuration(false) { }
     };
 
     typedef std::vector<OutputDescriptor> OutputList;
--- a/vamp-sdk/PluginBase.h	Thu Aug 07 20:30:36 2014 +0100
+++ b/vamp-sdk/PluginBase.h	Wed Sep 03 12:14:39 2014 +0100
@@ -193,7 +193,11 @@
         std::vector<std::string> valueNames;
 
         ParameterDescriptor() : // the defaults are invalid: you must set them
-            minValue(0), maxValue(0), defaultValue(0), isQuantized(false) { }
+            minValue(0), 
+            maxValue(0), 
+            defaultValue(0), 
+            isQuantized(false),
+            quantizeStep(0) { }
     };
 
     typedef std::vector<ParameterDescriptor> ParameterList;