ar: remove invalid extra param in bsdar_warnc calls
A number of warnings passed an exit status code to bsdar_warnc, but it does not take exit status (as a warning, it does not exit). MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
05eba8e068
commit
09319f7d3f
@ -796,7 +796,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (elf_getshstrndx(e, &shstrndx) == 0) {
|
if (elf_getshstrndx(e, &shstrndx) == 0) {
|
||||||
bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_getshstrndx failed: %s",
|
bsdar_warnc(bsdar, 0, "elf_getshstrndx failed: %s",
|
||||||
elf_errmsg(-1));
|
elf_errmsg(-1));
|
||||||
elf_end(e);
|
elf_end(e);
|
||||||
return;
|
return;
|
||||||
@ -833,8 +833,8 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
|
|||||||
scn = NULL;
|
scn = NULL;
|
||||||
while ((scn = elf_nextscn(e, scn)) != NULL) {
|
while ((scn = elf_nextscn(e, scn)) != NULL) {
|
||||||
if (gelf_getshdr(scn, &shdr) != &shdr) {
|
if (gelf_getshdr(scn, &shdr) != &shdr) {
|
||||||
bsdar_warnc(bsdar, EX_SOFTWARE, 0,
|
bsdar_warnc(bsdar, 0, "elf_getshdr failed: %s",
|
||||||
"elf_getshdr failed: %s", elf_errmsg(-1));
|
elf_errmsg(-1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (shdr.sh_type != SHT_SYMTAB)
|
if (shdr.sh_type != SHT_SYMTAB)
|
||||||
@ -847,7 +847,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
|
|||||||
len = data->d_size / shdr.sh_entsize;
|
len = data->d_size / shdr.sh_entsize;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
if (gelf_getsym(data, i, &sym) != &sym) {
|
if (gelf_getsym(data, i, &sym) != &sym) {
|
||||||
bsdar_warnc(bsdar, EX_SOFTWARE, 0,
|
bsdar_warnc(bsdar, 0,
|
||||||
"gelf_getsym failed: %s",
|
"gelf_getsym failed: %s",
|
||||||
elf_errmsg(-1));
|
elf_errmsg(-1));
|
||||||
continue;
|
continue;
|
||||||
@ -864,7 +864,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
|
|||||||
|
|
||||||
if ((name = elf_strptr(e, tabndx,
|
if ((name = elf_strptr(e, tabndx,
|
||||||
sym.st_name)) == NULL) {
|
sym.st_name)) == NULL) {
|
||||||
bsdar_warnc(bsdar, EX_SOFTWARE, 0,
|
bsdar_warnc(bsdar, 0,
|
||||||
"elf_strptr failed: %s",
|
"elf_strptr failed: %s",
|
||||||
elf_errmsg(-1));
|
elf_errmsg(-1));
|
||||||
continue;
|
continue;
|
||||||
@ -876,7 +876,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
|
|||||||
}
|
}
|
||||||
elferr = elf_errno();
|
elferr = elf_errno();
|
||||||
if (elferr != 0)
|
if (elferr != 0)
|
||||||
bsdar_warnc(bsdar, EX_SOFTWARE, 0, "elf_nextscn failed: %s",
|
bsdar_warnc(bsdar, 0, "elf_nextscn failed: %s",
|
||||||
elf_errmsg(elferr));
|
elf_errmsg(elferr));
|
||||||
|
|
||||||
elf_end(e);
|
elf_end(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user