diff options
| author | Bill Wendling <isanbard@gmail.com> | 2008-06-26 08:32:05 +0000 | 
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2008-06-26 08:32:05 +0000 | 
| commit | 3fdca23ee16094d05a2b85a50f70a57d9af47f2e (patch) | |
| tree | 13e8dde6b3a4f48253c936d0047033864bc7ac2d /llvm/lib | |
| parent | cf31de3760a0c3f59d19501138bc60a1bf80d5a6 (diff) | |
| download | bcm5719-llvm-3fdca23ee16094d05a2b85a50f70a57d9af47f2e.tar.gz bcm5719-llvm-3fdca23ee16094d05a2b85a50f70a57d9af47f2e.zip | |
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!
llvm-svn: 52775
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/System/Path.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/llvm/lib/System/Path.cpp b/llvm/lib/System/Path.cpp index baaa310214b..fbb6b6629ce 100644 --- a/llvm/lib/System/Path.cpp +++ b/llvm/lib/System/Path.cpp @@ -91,8 +91,8 @@ sys::IdentifyFileType(const char*magic, unsigned length) {        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 @@ sys::IdentifyFileType(const char*magic, unsigned length) {                   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 @@ sys::IdentifyFileType(const char*magic, unsigned length) {          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 | 

