Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2021 01:31:33 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e3580ab6e64a - stable/12 - ar: remove invalid extra param in bsdar_warnc calls
Message-ID:  <202108180131.17I1VX3I022404@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=e3580ab6e64a9ae6b8535419ad1724b37e30ce38

commit e3580ab6e64a9ae6b8535419ad1724b37e30ce38
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-08-11 17:22:23 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-08-18 01:30:58 +0000

    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
    
    (cherry picked from commit 09319f7d3f8aefe8a6b37b1c2a6d842126a2c181)
---
 usr.bin/ar/write.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/usr.bin/ar/write.c b/usr.bin/ar/write.c
index 24bac2f25b92..f515b2b4eb1e 100644
--- a/usr.bin/ar/write.c
+++ b/usr.bin/ar/write.c
@@ -787,7 +787,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
 		return;
 	}
 	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_end(e);
 		return;
@@ -824,8 +824,8 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
 	scn = NULL;
 	while ((scn = elf_nextscn(e, scn)) != NULL) {
 		if (gelf_getshdr(scn, &shdr) != &shdr) {
-			bsdar_warnc(bsdar, EX_SOFTWARE, 0,
-			    "elf_getshdr failed: %s", elf_errmsg(-1));
+			bsdar_warnc(bsdar, 0, "elf_getshdr failed: %s",
+			    elf_errmsg(-1));
 			continue;
 		}
 		if (shdr.sh_type != SHT_SYMTAB)
@@ -838,7 +838,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
 			len = data->d_size / shdr.sh_entsize;
 			for (i = 0; i < len; i++) {
 				if (gelf_getsym(data, i, &sym) != &sym) {
-					bsdar_warnc(bsdar, EX_SOFTWARE, 0,
+					bsdar_warnc(bsdar, 0,
 					    "gelf_getsym failed: %s",
 					     elf_errmsg(-1));
 					continue;
@@ -855,7 +855,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
 
 				if ((name = elf_strptr(e, tabndx,
 				    sym.st_name)) == NULL) {
-					bsdar_warnc(bsdar, EX_SOFTWARE, 0,
+					bsdar_warnc(bsdar, 0,
 					    "elf_strptr failed: %s",
 					     elf_errmsg(-1));
 					continue;
@@ -867,7 +867,7 @@ create_symtab_entry(struct bsdar *bsdar, void *maddr, size_t size)
 	}
 	elferr = elf_errno();
 	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_end(e);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108180131.17I1VX3I022404>