From d2fdc13491953ca990af7fe5bb8e632cc3cf2850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ho=C5=A1ek?= Date: Fri, 22 Nov 2013 01:55:11 +0100 Subject: [PATCH] HLLib: always initialize file access mode variable Fixes the warning appearing thanks to -Wuninitialized. --- HLLib/FileMapping.cpp | 2 +- HLLib/FileStream.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HLLib/FileMapping.cpp b/HLLib/FileMapping.cpp index eef612d..315dc25 100644 --- a/HLLib/FileMapping.cpp +++ b/HLLib/FileMapping.cpp @@ -132,7 +132,7 @@ hlBool CFileMapping::OpenInternal(hlUInt uiMode) } } #else - hlInt iMode; + hlInt iMode = 0; if((uiMode & HL_MODE_READ) && (uiMode & HL_MODE_WRITE)) { diff --git a/HLLib/FileStream.cpp b/HLLib/FileStream.cpp index c818d7d..2a6a2b8 100644 --- a/HLLib/FileStream.cpp +++ b/HLLib/FileStream.cpp @@ -82,7 +82,7 @@ hlBool CFileStream::Open(hlUInt uiMode) return hlFalse; } #else - hlInt iMode; + hlInt iMode = 0; if((uiMode & HL_MODE_READ) && (uiMode & HL_MODE_WRITE)) {