mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 19:01:31 +00:00
* Fix warning noticed by iphone-gcc
- Bug in the compiler?
This commit is contained in:
parent
264f95a40e
commit
e15ecf7e79
@ -386,7 +386,8 @@ char* Elf_(r_bin_elf_get_machine_name)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
}
|
||||
|
||||
char* Elf_(r_bin_elf_get_file_type)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
switch (bin->ehdr.e_type) {
|
||||
ut32 e_type = (ut32)bin->ehdr.e_type; // cast to avoid warn in iphone-gcc, must be ut16
|
||||
switch (e_type) {
|
||||
case ET_NONE: return strdup ("NONE (None)");
|
||||
case ET_REL: return strdup ("REL (Relocatable file)");
|
||||
case ET_EXEC: return strdup ("EXEC (Executable file)");
|
||||
@ -394,11 +395,11 @@ char* Elf_(r_bin_elf_get_file_type)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
case ET_CORE: return strdup ("CORE (Core file)");
|
||||
}
|
||||
|
||||
if ((bin->ehdr.e_type >= ET_LOPROC) && (bin->ehdr.e_type <= ET_HIPROC))
|
||||
return r_str_dup_printf ("Processor Specific: %x", bin->ehdr.e_type);
|
||||
else if ((bin->ehdr.e_type >= ET_LOOS) && (bin->ehdr.e_type <= ET_HIOS))
|
||||
return r_str_dup_printf ("OS Specific: %x", bin->ehdr.e_type);
|
||||
else return r_str_dup_printf ("<unknown>: %x", bin->ehdr.e_type);
|
||||
if ((e_type >= ET_LOPROC) && (e_type <= ET_HIPROC))
|
||||
return r_str_dup_printf ("Processor Specific: %x", e_type);
|
||||
else if ((e_type >= ET_LOOS) && (e_type <= ET_HIOS))
|
||||
return r_str_dup_printf ("OS Specific: %x", e_type);
|
||||
else return r_str_dup_printf ("<unknown>: %x", e_type);
|
||||
}
|
||||
|
||||
char* Elf_(r_bin_elf_get_elf_class)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
|
Loading…
Reference in New Issue
Block a user