[llvm-commits] [llvm] r52775 - /llvm/trunk/lib/System/Path.cpp
Bill Wendling
isanbard at gmail.com
Thu Jun 26 01:32:05 PDT 2008
Author: void
Date: Thu Jun 26 03:32:05 2008
New Revision: 52775
URL: http://llvm.org/viewvc/llvm-project?rev=52775&view=rev
Log:
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!
Modified:
llvm/trunk/lib/System/Path.cpp
Modified: llvm/trunk/lib/System/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Path.cpp?rev=52775&r1=52774&r2=52775&view=diff
==============================================================================
--- llvm/trunk/lib/System/Path.cpp (original)
+++ llvm/trunk/lib/System/Path.cpp Thu Jun 26 03:32:05 2008
@@ -91,8 +91,8 @@
break;
case 0xFE:
- case 0xCE:
- uint16_t type;
+ case 0xCE: {
+ uint16_t type = 0;
if (magic[0] == char(0xFE) && magic[1] == char(0xED) &&
magic[2] == char(0xFA) && magic[3] == char(0xCE)) {
/* Native endian */
@@ -101,7 +101,7 @@
magic[2] == char(0xED) && magic[3] == char(0xFE)) {
/* Reverse endian */
if (length >= 14) type = magic[13] << 8 | magic[12];
- }
+ }
switch (type) {
default: break;
case 1: return Mach_O_Object_FileType;
@@ -116,7 +116,7 @@
case 10: break; // FIXME: MH_DSYM companion file with only debug.
}
break;
-
+ }
case 0xF0: // PowerPC Windows
case 0x83: // Alpha 32-bit
case 0x84: // Alpha 64-bit
More information about the llvm-commits
mailing list