Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

syslog fallout...



Hi,

build.sh'ing distribution fails compiling .../usr.bin/logger:

dependall ===> usr.bin/logger
    compile  logger/logger.o
cc1: warnings being treated as errors
/u/NetBSD/src/usr.bin/logger/logger.c: In function 'main':
/u/NetBSD/src/usr.bin/logger/logger.c:122: warning: too many arguments for 
format
/u/NetBSD/src/usr.bin/logger/logger.c:126: warning: too many arguments for 
format
/u/NetBSD/src/usr.bin/logger/logger.c:135: warning: too many arguments for 
format
/u/NetBSD/src/usr.bin/logger/logger.c:141: warning: too many arguments for 
format

*** Failed target:  logger.o
*** Failed command: /u/NetBSD/arch/amd64/TOOLS/bin/x86_64--netbsd-gcc -O2 -pipe 
-fstack-protector -W
stack-protector --param ssp-buffer-size=1 -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-a
rith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Werror -nostdinc 
-isystem /u/NetBSD/ar
ch/amd64/dest/usr/include -D_FORTIFY_SOURCE=2 -c 
/u/NetBSD/src/usr.bin/logger/logger.c
*** Error code 1

Stop.

This can easily be patched away (perhaps not the right thing to do, but
usr.bin/logger/logger.c compiles w/ this patch): 

>-1009: cvs diff -u usr.bin/logger/logger.c
Index: usr.bin/logger/logger.c
===================================================================
RCS file: /cvsroot/src/usr.bin/logger/logger.c,v
retrieving revision 1.11
diff -u -r1.11 logger.c
--- usr.bin/logger/logger.c     31 Oct 2008 16:12:18 -0000      1.11
+++ usr.bin/logger/logger.c     31 Oct 2008 20:18:15 -0000
@@ -119,11 +119,11 @@
                for (p = buf, endp = buf + sizeof(buf) - 2; *argv != NULL;) {
                        len = strlen(*argv);
                        if (p + len > endp && p > buf) {
-                               syslogp(pri, "%s", "%s", "%s", msgid, sd, buf);
+                               syslogp(pri, msgid, sd, buf);
                                p = buf;
                        }
                        if (len > sizeof(buf) - 1)
-                               syslogp(pri, "%s", "%s", "%s", msgid, sd, 
*argv++);
+                               syslogp(pri, msgid, sd, *argv++);
                        else {
                                if (p != buf)
                                        *p++ = ' ';
@@ -132,13 +132,13 @@
                        }
                }
                if (p != buf)
-                       syslogp(pri, "%s", "%s", "%s", msgid, sd, buf);
+                       syslogp(pri, msgid, sd, buf);
        } else  /* TODO: allow syslog-protocol messages from file/stdin
                 *       but that will require parsing the line to split
                 *       it into three fields.
                 */
                while (fgets(buf, sizeof(buf), stdin) != NULL)
-                       syslogp(pri, "%s", "%s", "%s", msgid, sd, buf);
+                       syslogp(pri, msgid, sd, buf);
 
        exit(EXIT_SUCCESS);
        /* NOTREACHED */


But: next failure is 

dependall ===> usr.bin/newsyslog
     create  newsyslog/newsyslog.d
     create  newsyslog/.depend
    compile  newsyslog/newsyslog.o
/u/NetBSD/src/usr.bin/newsyslog/newsyslog.c: In function 'log_trimmed':
/u/NetBSD/src/usr.bin/newsyslog/newsyslog.c:687: error: 'SHORTHOSTNAME' 
undeclared (first use in thi
s function)
/u/NetBSD/src/usr.bin/newsyslog/newsyslog.c:687: error: (Each undeclared 
identifier is reported only
 once
/u/NetBSD/src/usr.bin/newsyslog/newsyslog.c:687: error: for each function it 
appears in.)
cc1: warnings being treated as errors
/u/NetBSD/src/usr.bin/newsyslog/newsyslog.c:704: warning: assignment discards 
qualifiers from pointe
r target type

*** Failed target:  newsyslog.o
*** Failed command: /u/NetBSD/arch/amd64/TOOLS/bin/x86_64--netbsd-gcc -O2 -pipe 
-Wall -Wstrict-proto
types -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional 
-Wa,--fatal-warnings -
Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra 
-Wno-unused-parameter -std=gnu99 
-Werror -nostdinc -isystem /u/NetBSD/arch/amd64/dest/usr/include -c 
/u/NetBSD/src/usr.bin/newsyslog/
newsyslog.c
*** Error code 1

Stop.

I've no good idea what to do here...

Kurt


Home | Main Index | Thread Index | Old Index