mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 15:41:38 +00:00
Fix a few GCC 12 warnings from #20087
This commit is contained in:
parent
e8af4bade5
commit
62d565e143
@ -3722,7 +3722,7 @@ static int x86_int_0x80(RAnalEsil *esil, int interrupt) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
eprintf ("syscall %d not implemented yet\n", syscall);
|
||||
R_LOG_ERROR ("syscall %d not implemented yet", syscall);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@ -3730,7 +3730,7 @@ static int x86_int_0x80(RAnalEsil *esil, int interrupt) {
|
||||
#if 0
|
||||
static int esil_x86_cs_intr(RAnalEsil *esil, int intr) {
|
||||
if (!esil) return false;
|
||||
eprintf ("INTERRUPT 0x%02x HAPPENS\n", intr);
|
||||
R_LOG_DEBUG ("INTERRUPT 0x%02x HAPPENS", intr);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
@ -1425,7 +1425,6 @@ RList *xnu_dbg_maps(RDebug *dbg, int only_modules) {
|
||||
//bool contiguous = false;
|
||||
//ut32 oldprot = UT32_MAX;
|
||||
//ut32 oldmaxprot = UT32_MAX;
|
||||
char buf[1024];
|
||||
char module_name[MAXPATHLEN];
|
||||
mach_vm_address_t address = MACH_VM_MIN_ADDRESS;
|
||||
mach_vm_size_t size = (mach_vm_size_t) 0;
|
||||
@ -1496,16 +1495,18 @@ RList *xnu_dbg_maps(RDebug *dbg, int only_modules) {
|
||||
maxperm[0] = 0;
|
||||
}
|
||||
// XXX: if its shared, it cannot be read?
|
||||
snprintf (buf, sizeof (buf), "%02x_%s%s%s%s%s%s%s%s",
|
||||
char *buf = r_str_newf ("%02x_%s%s%s%s%s%s%s%s",
|
||||
i, unparse_inheritance (info.inheritance),
|
||||
info.user_tag? "_user": "",
|
||||
info.is_submap? "_sub": "",
|
||||
"", info.is_submap ? "_submap": "",
|
||||
module_name, maxperm, depthstr);
|
||||
if (!(mr = r_debug_map_new (buf, address, address + size, xwr2rwx (info.protection), xwr2rwx (info.max_protection)))) {
|
||||
free (buf);
|
||||
R_LOG_ERROR ("Cannot create r_debug_map_new");
|
||||
break;
|
||||
}
|
||||
free (buf);
|
||||
RDebugMap *rdm = moduleAt (modules, address);
|
||||
if (rdm) {
|
||||
mr->file = strdup (rdm->name);
|
||||
|
@ -653,7 +653,9 @@ static int apprentice_load(RMagic *ms, struct r_magic **magicp, ut32 *nmagicp, c
|
||||
if (*d->d_name == '.') {
|
||||
continue;
|
||||
}
|
||||
snprintf (subfn, sizeof (subfn), "%s/%s", fn, d->d_name);
|
||||
if (snprintf (subfn, sizeof (subfn), "%s/%s", fn, d->d_name) < 0) {
|
||||
continue;
|
||||
}
|
||||
if (stat (subfn, &st) == 0 && S_ISREG (st.st_mode)) {
|
||||
load_1 (ms, action, subfn, &errs, &marray, &marraycount);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user