Subject: bin/14362: tty_warn(,,ftnode->lineno,,) lossage on sparc in src/bin/pax/ftree.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <windsor@warthog.com>
List: netbsd-bugs
Date: 10/26/2001 09:49:50
>Number: 14362
>Category: bin
>Synopsis: tty_warn(,,ftnode->lineno,,) lossage on sparc in src/bin/pax/ftree.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 26 07:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD-current 20011025/20011026
>Organization:
Nose-Pickers Anonymous
>Environment:
System: NetBSD apollo 1.5Y NetBSD 1.5Y (SUN4M_CURRENT) #7: Wed Oct 10 18:05:16 CDT 2001 windsor@apollo:/usr/src/sys/arch/sparc/compile/SUN4M_CURRENT sparc
Architecture: sparc
Machine: sparc
>Description:
cc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror -I/usr/src/bin/pax/../../usr.sbin/mtree -I/usr/src/bin/pax/../../sbin/mknod -I/usr/src/bin/pax/../../bin/ls -c ftree.c
cc1: warnings being treated as errors
ftree.c: In function `next_file':
ftree.c:432: warning: int format, long int arg (arg 3)
ftree.c:456: warning: int format, long int arg (arg 3)
ftree.c:457: warning: int format, long int arg (arg 3)
ftree.c:460: warning: int format, long int arg (arg 3)
ftree.c:461: warning: int format, long int arg (arg 3)
ftree.c:464: warning: int format, long int arg (arg 3)
ftree.c:466: warning: int format, long int arg (arg 3)
ftree.c:475: warning: int format, long int arg (arg 3)
*** Error code 1
Stop.
make: stopped in /usr/src/bin/pax
*** Error code 1
>How-To-Repeat:
"make depend && make" in src/bin/pax on sparc
>Fix:
Apply following patch (I tested it against i386, fwiw):
--- src/bin/pax/ftree.c.FCS Fri Oct 26 09:33:39 2001
+++ src/bin/pax/ftree.c Fri Oct 26 09:42:47 2001
@@ -429,7 +429,7 @@
curdir, curdirlen ? "/" : "", ftnode->name)
>= sizeof(curpath)) {
tty_warn(1, "line %d: %s: %s",
- ftnode->lineno, curdir, strerror(ENAMETOOLONG));
+ (int)ftnode->lineno, curdir, strerror(ENAMETOOLONG));
return (-1);
}
ftnode->flags |= F_VISIT; /* mark node visited */
@@ -449,7 +449,7 @@
#define NODETEST(t, m) \
if (!(t)) { \
tty_warn(1, "line %d: %s: %s not specified", \
- ftnode->lineno, ftent->fts_path, m); \
+ (int)ftnode->lineno, ftent->fts_path, m); \
return(-1); \
}
statbuf.st_mode = nodetoino(ftnode->type);
@@ -470,7 +470,7 @@
nodetoino(ftnode->type) != (statbuf.st_mode & S_IFMT)) {
tty_warn(1,
"line %d: %s: type mismatch: specfile %s, tree %s",
- ftnode->lineno, ftent->fts_path,
+ (int)ftnode->lineno, ftent->fts_path,
inotype(nodetoino(ftnode->type)),
inotype(statbuf.st_mode));
return(-1);
>Release-Note:
>Audit-Trail:
>Unformatted: