From 9e340b1c818b95454656ac3e5210fdd8235a6ab1 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Wed, 27 Aug 2014 20:35:20 -0500 Subject: [PATCH] Initialize variables to silence garbage return warning from scan-build. --- Source/Core/DiscIO/BannerLoaderWii.cpp | 2 +- Source/Core/DiscIO/VolumeGC.cpp | 2 +- Source/Core/DolphinWX/ISOFile.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/DiscIO/BannerLoaderWii.cpp b/Source/Core/DiscIO/BannerLoaderWii.cpp index dc32765b3b..84f264d40d 100644 --- a/Source/Core/DiscIO/BannerLoaderWii.cpp +++ b/Source/Core/DiscIO/BannerLoaderWii.cpp @@ -22,7 +22,7 @@ namespace DiscIO CBannerLoaderWii::CBannerLoaderWii(DiscIO::IVolume *pVolume) { - u64 TitleID; + u64 TitleID = 0; pVolume->GetTitleID((u8*)&TitleID); TitleID = Common::swap64(TitleID); diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 63c60a9846..f0f3d4ee25 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -157,7 +157,7 @@ u64 CVolumeGC::GetRawSize() const bool CVolumeGC::IsDiscTwo() const { - bool discTwo; + bool discTwo = false; Read(6,1, (u8*) &discTwo); return discTwo; } diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 891d194df8..81cf223284 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -288,7 +288,7 @@ const std::string GameListItem::GetWiiFSPath() const if (DiscIO::IsVolumeWiiDisc(iso) || DiscIO::IsVolumeWadFile(iso)) { - u64 title; + u64 title = 0; iso->GetTitleID((u8*)&title); title = Common::swap64(title);