cvs commit: src/bin/ls extern.h ls.c print.c util.c src/bin/pax ar_io.c ar_subs.c cache.c cpio.c extern.h gen_subs.c getoldopt.c options.c pat_rep.c pax.c pax.h src/bin/ps fmt.c src/bin/rcp rcp.c

Giorgos Keramidas keramida at ceid.upatras.gr
Sat May 3 14:44:33 PDT 2003


On 2003-05-03 22:30, Mark Murray <mark at grondar.org> wrote:
>
> Can you play around with WARNS=N (N=0..6) and -ansi|-std=(c89|c99) to see
> what combination gives the problem?

Plain -Wall gives the warnings.  Apparently, any WARNS-level >= 1 now
includes -Werror, which makes these warnings fatal.

: giorgos at gothmog[00:36]/a/freebsd/src/bin/ps$ rm print.o
: giorgos at gothmog[00:36]/a/freebsd/src/bin/ps$ make WARNS=0 print.o
: cc -O2 -Wall -pipe -DLAZY_PS    -c print.c
: print.c: In function `started':
: print.c:405: warning: `%y' yields only last 2 digits of year
: print.c: In function `lstarted':
: print.c:422: warning: `%c' yields only last 2 digits of year in some locales on non-BSD systems
:
: giorgos at gothmog[00:36]/a/freebsd/src/bin/ps$ rm print.o
: giorgos at gothmog[00:36]/a/freebsd/src/bin/ps$ make WARNS=1 print.o
: cc -O2 -Wall -pipe -DLAZY_PS   -Wsystem-headers -Werror  -c print.c
: cc1: warnings being treated as errors
: print.c: In function `started':
: print.c:405: warning: `%y' yields only last 2 digits of year
: print.c: In function `lstarted':
: print.c:422: warning: `%c' yields only last 2 digits of year in some locales on non-BSD systems
: *** Error code 1
:
: Stop in /home/giorgos/a/freebsd/src/bin/ps.
:
: giorgos at gothmog[00:36]/a/freebsd/src/bin/ps$


The warnings are a result of -Wformat-y2k, which is included in -Wall:

: giorgos at gothmog[00:42]/a/freebsd/src/bin/ps$ rm print.o
: giorgos at gothmog[00:42]/a/freebsd/src/bin/ps$ make CFLAGS='-Wall -Wno-format-y2k' print.o
: cc -Wall -Wno-format-y2k -c print.c
:
: giorgos at gothmog[00:42]/a/freebsd/src/bin/ps$ rm print.o
: giorgos at gothmog[00:42]/a/freebsd/src/bin/ps$ make CFLAGS='-Wall' print.o
: cc -Wall -c print.c
: print.c: In function `started':
: print.c:405: warning: `%y' yields only last 2 digits of year
: print.c: In function `lstarted':
: print.c:422: warning: `%c' yields only last 2 digits of year in some locales on non-BSD systems
:
: giorgos at gothmog[00:42]/a/freebsd/src/bin/ps$



More information about the cvs-src mailing list