mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 00:14:20 +00:00
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6521549188
commit
fc1fd54a34
@ -91,8 +91,8 @@ sys::IdentifyFileType(const char*magic, unsigned length) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xFE:
|
case 0xFE:
|
||||||
case 0xCE:
|
case 0xCE: {
|
||||||
uint16_t type;
|
uint16_t type = 0;
|
||||||
if (magic[0] == char(0xFE) && magic[1] == char(0xED) &&
|
if (magic[0] == char(0xFE) && magic[1] == char(0xED) &&
|
||||||
magic[2] == char(0xFA) && magic[3] == char(0xCE)) {
|
magic[2] == char(0xFA) && magic[3] == char(0xCE)) {
|
||||||
/* Native endian */
|
/* Native endian */
|
||||||
@ -101,7 +101,7 @@ sys::IdentifyFileType(const char*magic, unsigned length) {
|
|||||||
magic[2] == char(0xED) && magic[3] == char(0xFE)) {
|
magic[2] == char(0xED) && magic[3] == char(0xFE)) {
|
||||||
/* Reverse endian */
|
/* Reverse endian */
|
||||||
if (length >= 14) type = magic[13] << 8 | magic[12];
|
if (length >= 14) type = magic[13] << 8 | magic[12];
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
default: break;
|
default: break;
|
||||||
case 1: return Mach_O_Object_FileType;
|
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.
|
case 10: break; // FIXME: MH_DSYM companion file with only debug.
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 0xF0: // PowerPC Windows
|
case 0xF0: // PowerPC Windows
|
||||||
case 0x83: // Alpha 32-bit
|
case 0x83: // Alpha 32-bit
|
||||||
case 0x84: // Alpha 64-bit
|
case 0x84: // Alpha 64-bit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user