diff --git a/libr/bin/p/bin_coff.c b/libr/bin/p/bin_coff.c index 196e8e609d..7f99ad618a 100644 --- a/libr/bin/p/bin_coff.c +++ b/libr/bin/p/bin_coff.c @@ -181,7 +181,6 @@ static RList *symbols(RBinFile *bf) { int i; RList *ret = NULL; RBinSymbol *ptr = NULL; - struct coff_symbol *s; struct r_bin_coff_obj *obj = (struct r_bin_coff_obj*)bf->o->bin_obj; if (!(ret = r_list_new ())) { return ret; @@ -189,7 +188,6 @@ static RList *symbols(RBinFile *bf) { ret->free = free; if (obj->symbols) { for (i = 0; i < obj->hdr.f_nsyms; i++) { - s = &obj->symbols[i]; if (!(ptr = R_NEW0 (RBinSymbol))) { break; } diff --git a/libr/bin/p/bin_pe64.c b/libr/bin/p/bin_pe64.c index 0297c4895c..7975ea4f62 100644 --- a/libr/bin/p/bin_pe64.c +++ b/libr/bin/p/bin_pe64.c @@ -325,7 +325,7 @@ static RList *trycatch(RBinFile *bf) { return NULL; } - RList *tclist = r_list_newf (r_bin_trycatch_free); + RList *tclist = r_list_newf ((RListFree)r_bin_trycatch_free); if (!tclist) { return NULL; } @@ -390,9 +390,6 @@ static RList *trycatch(RBinFile *bf) { } } return tclist; -err: - r_list_free (tclist); - return NULL; } RBinPlugin r_bin_plugin_pe64 = { diff --git a/libr/cons/input.c b/libr/cons/input.c index bbb6cbffcd..5f391d3484 100644 --- a/libr/cons/input.c +++ b/libr/cons/input.c @@ -51,7 +51,7 @@ R_API int r_cons_controlz(int ch) { static int __parseMouseEvent() { char xpos[32]; char ypos[32]; - int ch = r_cons_readchar (); + (void)r_cons_readchar (); // skip first char int ch2 = r_cons_readchar (); // [32M - mousedown @@ -76,7 +76,7 @@ static int __parseMouseEvent() { } ypos[i] = 0; r_cons_set_click (atoi (xpos), atoi (ypos)); - ch = r_cons_readchar (); + (void) r_cons_readchar (); // ignored int ch = r_cons_readchar (); if (ch == 27) { diff --git a/libr/util/json_indent.c b/libr/util/json_indent.c index f7c7b09ca3..7a5273ecac 100644 --- a/libr/util/json_indent.c +++ b/libr/util/json_indent.c @@ -156,7 +156,6 @@ R_API char* r_print_json_human(const char* s) { const char *tab = " "; const int indentSize = strlen (tab); int instr = 0; - bool isValue = false; char *o, *OE, *tmp; if (!s) { return NULL; @@ -218,16 +217,13 @@ R_API char* r_print_json_human(const char* s) { case ':': *o++ = *s; *o++ = ' '; - isValue = true; break; case ',': *o++ = '\n'; - isValue = false; doIndent (indent - 1, &o, tab); break; case '{': case '[': - isValue = false; if (indent > 0) { *o++ = (indent != -1)? '\n': ' '; } @@ -241,7 +237,6 @@ R_API char* r_print_json_human(const char* s) { break; case '}': case ']': - isValue = false; indent--; doIndent (indent - 1, &o, tab); break; diff --git a/libr/util/table.c b/libr/util/table.c index be9c2c3f37..72b7ee2628 100644 --- a/libr/util/table.c +++ b/libr/util/table.c @@ -701,26 +701,9 @@ R_API void r_table_visual_list(RTable *table, RList *list, ut64 seek, ut64 len, } mul = (max - min) / width; if (min != -1 && mul > 0) { - const char * color = "", *color_end = ""; i = 0; r_list_foreach (list, iter, info) { RStrBuf *buf = r_strbuf_new (""); - if (cons->context->color_mode && info->perm != -1) { - color_end = Color_RESET; - if ((info->perm & R_PERM_X) && (info->perm & R_PERM_W)) { // exec & write bits - color = cons->context->pal.graph_trufae; - } else if ((info->perm & R_PERM_X)) { // exec bit - color = cons->context->pal.graph_true; - } else if ((info->perm & R_PERM_W)) { // write bit - color = cons->context->pal.graph_false; - } else { - color = ""; - color_end = ""; - } - } else { - color = ""; - color_end = ""; - } for (j = 0; j < width; j++) { ut64 pos = min + j * mul; ut64 npos = min + (j + 1) * mul;