From a04efc92d03c28be336ca2eec9cef2196d8db092 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 6 Oct 2002 22:53:29 +0000 Subject: [PATCH] Added variable initializations. Not necessary, but they please the compiler. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1414 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/storage/AppFileInfo.cpp | 10 +++++----- src/kits/storage/File.cpp | 2 +- src/kits/storage/NodeInfo.cpp | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/kits/storage/AppFileInfo.cpp b/src/kits/storage/AppFileInfo.cpp index 8e6b5017bb..bb552af233 100644 --- a/src/kits/storage/AppFileInfo.cpp +++ b/src/kits/storage/AppFileInfo.cpp @@ -742,8 +742,8 @@ BAppFileInfo::GetIconForType(const char *type, BBitmap *icon, // set some icon size related variables BString attributeString; BRect bounds; - uint32 attrType; - size_t attrSize; + uint32 attrType = 0; + size_t attrSize = 0; switch (which) { case B_MINI_ICON: attributeString = kMiniIconAttribute; @@ -842,9 +842,9 @@ BAppFileInfo::SetIconForType(const char *type, const BBitmap *icon, // set some icon size related variables BString attributeString; BRect bounds; - uint32 attrType; - size_t attrSize; - int32 resourceID; + uint32 attrType = 0; + size_t attrSize = 0; + int32 resourceID = 0; switch (which) { case B_MINI_ICON: attributeString = kMiniIconAttribute; diff --git a/src/kits/storage/File.cpp b/src/kits/storage/File.cpp index 3a0a6a23bd..5b9dadf343 100644 --- a/src/kits/storage/File.cpp +++ b/src/kits/storage/File.cpp @@ -222,7 +222,7 @@ BFile::SetTo(const char *path, uint32 openMode) // analyze openMode // Well, it's a bit schizophrenic to convert the B_* style openMode // to POSIX style openFlags, but to use O_RWMASK to filter openMode. - BPrivate::Storage::OpenFlags openFlags; + BPrivate::Storage::OpenFlags openFlags = 0; switch (openMode & O_RWMASK) { case B_READ_ONLY: openFlags = O_RDONLY; diff --git a/src/kits/storage/NodeInfo.cpp b/src/kits/storage/NodeInfo.cpp index d09b102c51..b13200c59b 100644 --- a/src/kits/storage/NodeInfo.cpp +++ b/src/kits/storage/NodeInfo.cpp @@ -223,8 +223,8 @@ BNodeInfo::GetIcon(BBitmap *icon, icon_size k) const // set some icon size related variables const char *attribute = NULL; BRect bounds; - uint32 attrType; - size_t attrSize; + uint32 attrType = 0; + size_t attrSize = 0; switch (k) { case B_MINI_ICON: attribute = kNIMiniIconAttribute; @@ -319,8 +319,8 @@ BNodeInfo::SetIcon(const BBitmap *icon, icon_size k) // set some icon size related variables const char *attribute = NULL; BRect bounds; - uint32 attrType; - size_t attrSize; + uint32 attrType = 0; + size_t attrSize = 0; switch (k) { case B_MINI_ICON: attribute = kNIMiniIconAttribute; @@ -349,7 +349,7 @@ BNodeInfo::SetIcon(const BBitmap *icon, icon_size k) if (error == B_OK) { if (icon) { bool otherColorSpace = (icon->ColorSpace() != B_CMAP8); - ssize_t written; + ssize_t written = 0; if (otherColorSpace) { BBitmap bitmap(bounds, B_CMAP8); error = bitmap.InitCheck();