Coverity: Fix some warnings from core.cpp/.h

This commit is contained in:
baldurk
2016-05-24 23:28:15 +02:00
parent ddf64963a5
commit 65a7cc62c0
2 changed files with 6 additions and 3 deletions
+6 -2
View File
@@ -43,11 +43,11 @@ bool is_exr_file(FILE *f)
const uint32_t openexr_magic = MAKE_FOURCC(0x76, 0x2f, 0x31, 0x01);
uint32_t magic = 0;
FileIO::fread(&magic, sizeof(magic), 1, f);
size_t bytesRead = FileIO::fread(&magic, sizeof(magic), 1, f);
FileIO::fseek64(f, 0, SEEK_SET);
return magic == openexr_magic;
return bytesRead == sizeof(magic) && magic == openexr_magic;
}
template <>
@@ -160,6 +160,9 @@ RenderDoc::RenderDoc()
m_CapturesActive = 0;
m_RemoteIdent = 0;
m_RemoteThread = 0;
m_Replay = false;
m_Cap = false;
@@ -190,6 +193,7 @@ void RenderDoc::Initialise()
Threading::Init();
m_RemoteIdent = 0;
m_RemoteThread = 0;
if(!IsReplayApp())
{
-1
View File
@@ -392,7 +392,6 @@ private:
static void RemoteAccessClientThread(void *s);
ICrashHandler *m_ExHandler;
bool m_GLSLang;
};
struct DriverRegistration