mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-01 17:40:34 +00:00
Fix few clang warnings (#12394)
This commit is contained in:
parent
bbebd7ed86
commit
3ca357b182
@ -77,7 +77,9 @@ static bool load(RBinFile *bf) {
|
||||
}
|
||||
load_bytes (bf, &bf->o->bin_obj, bytes, sz, bf->o->loadaddr, bf->sdb);
|
||||
if (!bf->o || !bf->o->bin_obj) {
|
||||
MACH0_(mach0_free) (bf->o->bin_obj);
|
||||
if (bf->o) {
|
||||
MACH0_(mach0_free) (bf->o->bin_obj);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
struct MACH0_(obj_t) *mo = bf->o->bin_obj;
|
||||
|
@ -814,7 +814,7 @@ static int cmd_type(void *data, const char *input) {
|
||||
ls_free (l);
|
||||
} else { // "tej ENUM"
|
||||
RListIter *iter;
|
||||
RTypeEnum *member = R_NEW0 (RTypeEnum);
|
||||
RTypeEnum *member;
|
||||
if (member_name) {
|
||||
res = r_type_enum_member (TDB, name, NULL, r_num_math (core->num, member_name));
|
||||
// NEVER REACHED
|
||||
|
@ -1099,7 +1099,6 @@ repeat:
|
||||
|
||||
int maxcount = 9;
|
||||
int rows, cols = r_cons_get_size (&rows);
|
||||
idx = 0;
|
||||
count = 0;
|
||||
char *dis = NULL;
|
||||
rows -= 4;
|
||||
@ -2312,7 +2311,7 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
|
||||
cur = core->print->cur - 1;
|
||||
}
|
||||
snprintf (buf, sizeof (buf), "%s @ $$0!%i", p,
|
||||
core->blocksize - core->print->cur);
|
||||
core->blocksize - cur);
|
||||
r_core_cmd (core, buf, 0);
|
||||
free (p);
|
||||
break;
|
||||
@ -2422,7 +2421,7 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
|
||||
r_io_sundo_push (core->io, core->offset, r_print_get_cursor (core->print));
|
||||
break;
|
||||
case 'G':
|
||||
ret = 0;
|
||||
ret = -1;
|
||||
int scols = r_config_get_i (core->config, "hex.cols");
|
||||
if (core->file) {
|
||||
if (core->io->va) {
|
||||
@ -2442,8 +2441,6 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
|
||||
r_io_fd_size (core->io, core->file->fd)
|
||||
- core->blocksize + 2 * scols, 1);
|
||||
}
|
||||
} else {
|
||||
ret = -1;
|
||||
}
|
||||
if (ret != -1) {
|
||||
r_io_sundo_push (core->io, core->offset, r_print_get_cursor (core->print));
|
||||
@ -2943,7 +2940,6 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
|
||||
// have to escape any quotes.
|
||||
int j, len = strlen (buf);
|
||||
char *duped = strdup (buf);
|
||||
i = 4, j = 4;
|
||||
for (i = 4, j = 4; i < len; ++i,++j) {
|
||||
char c = duped[i];
|
||||
if (c == '"' && i != (len - 1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user