mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
UPSTREAM: tools/resolve_btfids: Fix warnings
* make eprintf static, used only in main.c
* initialize ret in eprintf
* remove unused *tmp
v3:
* remove another err (Song Liu)
v2:
* remove unused 'int err = -1'
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210329223143.3659983-1-sdf@google.com
(cherry picked from commit e27bfefb21)
Bug: 203823368
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: Ie1e72f161805e9b9634e45e6a348bbc386dfd076
This commit is contained in:
committed by
Connor O'Brien
parent
f74899b38f
commit
da8e680070
@@ -115,10 +115,10 @@ struct object {
|
||||
|
||||
static int verbose;
|
||||
|
||||
int eprintf(int level, int var, const char *fmt, ...)
|
||||
static int eprintf(int level, int var, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (var >= level) {
|
||||
va_start(args, fmt);
|
||||
@@ -383,7 +383,7 @@ static int elf_collect(struct object *obj)
|
||||
static int symbols_collect(struct object *obj)
|
||||
{
|
||||
Elf_Scn *scn = NULL;
|
||||
int n, i, err = 0;
|
||||
int n, i;
|
||||
GElf_Shdr sh;
|
||||
char *name;
|
||||
|
||||
@@ -400,11 +400,10 @@ static int symbols_collect(struct object *obj)
|
||||
* Scan symbols and look for the ones starting with
|
||||
* __BTF_ID__* over .BTF_ids section.
|
||||
*/
|
||||
for (i = 0; !err && i < n; i++) {
|
||||
char *tmp, *prefix;
|
||||
for (i = 0; i < n; i++) {
|
||||
char *prefix;
|
||||
struct btf_id *id;
|
||||
GElf_Sym sym;
|
||||
int err = -1;
|
||||
|
||||
if (!gelf_getsym(obj->efile.symbols, i, &sym))
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user