mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-01 18:57:20 +00:00
Fix warnings introduced recently
This commit is contained in:
parent
cb3ac67ca2
commit
a1666a7712
@ -2538,6 +2538,11 @@ R_API int r_core_anal_fcn_list(RCore *core, const char *input, const char *rad)
|
||||
}
|
||||
|
||||
r_list_sort (fcns, &cmpfcn);
|
||||
if (!rad) {
|
||||
fcn_list_default (core, fcns, false);
|
||||
r_list_free (fcns);
|
||||
return 0;
|
||||
}
|
||||
switch (*rad) {
|
||||
case '+':
|
||||
r_core_anal_fcn_list_size (core);
|
||||
|
@ -1045,13 +1045,12 @@ static int cmd_kuery(void *data, const char *input) {
|
||||
if (!*buf) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (sdb_hist && r_list_length (sdb_hist) == 1 ||
|
||||
(r_list_length (sdb_hist) > 1 && strcmp (r_list_get_n (sdb_hist, 1), buf))) {
|
||||
r_list_insert (sdb_hist, 1, strdup (buf));
|
||||
if (sdb_hist) {
|
||||
if ((r_list_length (sdb_hist) == 1) || (r_list_length (sdb_hist) > 1 && strcmp (r_list_get_n (sdb_hist, 1), buf))) {
|
||||
r_list_insert (sdb_hist, 1, strdup (buf));
|
||||
}
|
||||
line->sdbshell_hist_iter = sdb_hist->head;
|
||||
}
|
||||
line->sdbshell_hist_iter = sdb_hist->head;
|
||||
|
||||
out = sdb_querys (s, NULL, 0, buf);
|
||||
if (out) {
|
||||
r_cons_println (out);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2009-2017 - pancake, nibble */
|
||||
/* radare - LGPL - Copyright 2009-2018 - pancake, nibble */
|
||||
|
||||
#include <r_core.h>
|
||||
#include <r_anal.h>
|
||||
|
@ -5414,7 +5414,7 @@ R_API int r_core_print_disasm_json(RCore *core, ut64 addr, ut8 *buf, int nb_byte
|
||||
core->offset = old_offset;
|
||||
r_anal_op_fini (&ds->analop);
|
||||
ds_free (ds);
|
||||
if (result == false) {
|
||||
if (!result) {
|
||||
r_cons_printf ("{}");
|
||||
result = true;
|
||||
}
|
||||
@ -5436,7 +5436,7 @@ R_API int r_core_print_disasm_all(RCore *core, ut64 addr, int l, int len, int mo
|
||||
r_io_read_at (core->io, addr, buf, l);
|
||||
}
|
||||
if (mode == 'j') {
|
||||
r_cons_printf ("[");
|
||||
r_cons_print ("[");
|
||||
}
|
||||
r_cons_break_push (NULL, NULL);
|
||||
for (i = 0; i < l; i++) {
|
||||
@ -5472,7 +5472,7 @@ R_API int r_core_print_disasm_all(RCore *core, ut64 addr, int l, int len, int mo
|
||||
RAnalFunction *f = fcnIn (ds, ds->vat, R_ANAL_FCN_TYPE_NULL);
|
||||
r_anal_op (core->anal, &aop, addr, buf+i, l-i, R_ANAL_OP_MASK_ALL);
|
||||
buf_asm = r_print_colorize_opcode (core->print, str,
|
||||
core->cons->pal.reg, core->cons->pal.num, false, f ? f : 0);
|
||||
core->cons->pal.reg, core->cons->pal.num, false, f ? f->addr : 0);
|
||||
r_cons_printf ("%s%s\n",
|
||||
r_print_color_op_type (core->print, aop.type),
|
||||
buf_asm);
|
||||
|
@ -43,7 +43,7 @@ R_API int r_file_mkstemp(const char *prefix, char **oname);
|
||||
R_API char *r_file_tmpdir(void);
|
||||
R_API char *r_file_readlink(const char *path);
|
||||
R_API bool r_file_copy (const char *src, const char *dst);
|
||||
R_API RList* r_file_globsearch (char *globbed_path, int maxdepth);
|
||||
R_API RList* r_file_globsearch (const char *globbed_path, int maxdepth);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -1065,7 +1065,8 @@ static void recursive_search_glob (const char *path, const char *glob, RList* li
|
||||
r_list_free (dir);
|
||||
}
|
||||
|
||||
R_API RList* r_file_globsearch (char *globbed_path, int maxdepth) {
|
||||
R_API RList* r_file_globsearch (const char *_globbed_path, int maxdepth) {
|
||||
char *globbed_path = strdup (_globbed_path);
|
||||
RList *files = r_list_newf (free);
|
||||
char *glob = strchr (globbed_path, '*');
|
||||
if (!glob) {
|
||||
@ -1101,5 +1102,6 @@ R_API RList* r_file_globsearch (char *globbed_path, int maxdepth) {
|
||||
}
|
||||
free (path);
|
||||
}
|
||||
free (globbed_path);
|
||||
return files;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user