elfcreator: Remove unused 'machine' variable
Addresses: [ 84%] Building C object CMakeFiles/scncopy.dir/elfcreator.c.o /home/acme/git/pahole/elfcreator.c: In function ‘elfcreator_begin’: /home/acme/git/pahole/elfcreator.c:57:12: error: variable ‘machine’ set but not used [-Werror=unused-but-set-variable] GElf_Half machine; ^~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
0f52b11f91
commit
7360f0528f
|
@ -54,7 +54,6 @@ static void clear(ElfCreator *ctor, int do_unlink)
|
|||
ElfCreator *elfcreator_begin(char *path, Elf *elf) {
|
||||
ElfCreator *ctor = NULL;
|
||||
GElf_Ehdr ehdr_mem, *ehdr;
|
||||
GElf_Half machine;
|
||||
|
||||
if (!(ctor = calloc(1, sizeof(*ctor))))
|
||||
return NULL;
|
||||
|
@ -65,7 +64,6 @@ ElfCreator *elfcreator_begin(char *path, Elf *elf) {
|
|||
ctor->oldelf = elf;
|
||||
|
||||
ehdr = gelf_getehdr(elf, &ehdr_mem);
|
||||
machine = ehdr->e_machine;
|
||||
|
||||
if ((ctor->fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0755)) < 0) {
|
||||
err:
|
||||
|
|
Loading…
Reference in New Issue