Mercurial > hg > svcore
changeset 977:048173126e71
Fix some uninitialised values (from coverity scan)
author | Chris Cannam |
---|---|
date | Wed, 03 Sep 2014 13:06:13 +0100 |
parents | 45e95de8b11d |
children | 9f526ddc6165 |
files | base/Clipboard.cpp data/fileio/MP3FileReader.cpp |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/base/Clipboard.cpp Wed Sep 03 11:27:23 2014 +0100 +++ b/base/Clipboard.cpp Wed Sep 03 13:06:13 2014 +0100 @@ -19,6 +19,7 @@ m_haveFrame(true), m_frame(frame), m_haveValue(false), + m_value(0), m_haveDuration(false), m_duration(0), m_haveLabel(true),
--- 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 (...) {