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();