Suppress 2 LGTM alerts (#16631)

This commit is contained in:
Liumeo 2020-04-19 13:05:35 -04:00 committed by GitHub
parent 4560120be2
commit 3c2cd8cbd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -1333,12 +1333,12 @@ static EDemanglerErr parse_microsoft_mangled_name(char *sym, char **demangled_na
err = eDemanglerErrUnsupportedMangling;
break;
#define SET_ACCESS_MODIFIER(letter, flag_set, modifier_str) { \
case letter: \
#define SET_ACCESS_MODIFIER(letter, flag_set, modifier_str) \
case letter: { \
access_modifier = modifier_str; \
(flag_set) = 1; \
break; \
}
}
/* Functions */
SET_ACCESS_MODIFIER ('E', is_implicit_this_pointer, "private virtual");
SET_ACCESS_MODIFIER ('F', is_implicit_this_pointer, "private virtual");

View File

@ -2848,7 +2848,7 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
} else {
str[0] = 0;
}
const char *name = (r->bin->prefix)
const char *section_name = (r->bin->prefix)
? sdb_fmt ("%s.%s", r->bin->prefix, section->name)
: section->name;
// seems like asm.bits is a bitmask that seems to be always 32,64
@ -2857,12 +2857,12 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
r_table_add_rowf (table, "dXxXxsss", i,
(ut64)section->paddr, (ut64)section->size,
(ut64)addr, (ut64)section->vsize,
perms, hashstr, name);
perms, hashstr, section_name);
} else {
r_table_add_rowf (table, "dXxXxss", i,
(ut64)section->paddr, (ut64)section->size,
(ut64)addr, (ut64)section->vsize,
perms, name);
perms, section_name);
}
free (hashstr);
}

View File

@ -673,7 +673,6 @@ repeat:
r_strbuf_free (p);
r_strbuf_free (q);
goto repeat;
return ret;
}
static void prompt_read(const char *p, char *buf, int buflen) {