diff data/fileio/MP3FileReader.cpp @ 977:048173126e71

Fix some uninitialised values (from coverity scan)
author Chris Cannam
date Wed, 03 Sep 2014 13:06:13 +0100
parents d03b3d956358
children cc27f35aa75c
line wrap: on
line diff
--- a/data/fileio/MP3FileReader.cpp	Wed Sep 03 11:27:23 2014 +0100
+++ b/data/fileio/MP3FileReader.cpp	Wed Sep 03 13:06:13 2014 +0100
@@ -63,6 +63,10 @@
 
     m_fileSize = stat.st_size;
 
+    m_filebuffer = 0;
+    m_samplebuffer = 0;
+    m_samplebuffersize = 0;
+
     int fd = -1;
     if ((fd = ::open(m_path.toLocal8Bit().data(), O_RDONLY
 #ifdef _WIN32
@@ -73,10 +77,6 @@
 	return;
     }	
 
-    m_filebuffer = 0;
-    m_samplebuffer = 0;
-    m_samplebuffersize = 0;
-
     try {
         m_filebuffer = new unsigned char[m_fileSize];
     } catch (...) {