Re: Alpha fatal warning in kernel compile

2002-09-13 Thread Bruce Evans


On Thu, 12 Sep 2002, Kris Kennaway wrote:

 How are you supposed to disable -Werror in kernel builds?  Setting

Not :-).  You are supposed to fix errors and not ignore them.

 ...
 cc1: warnings being treated as errors
 /local0/src2/sys/dev/ccd/ccd.c: In function `ccdiodone':
 /local0/src2/sys/dev/ccd/ccd.c:1181: warning: long long int format, daddr_t arg (arg 
6)
 *** Error code 1

This is a routine printf format error.  %lld format should only be used
for printing long longs (which should never be used).  Here the type is
daddr_t, which happens to be int64_t, which happens to be plain long on
alphas.

Don't forget to fix the other error in the printf.  2 bio_blkno's are
printed using 2 different wrong formats, but only 1 is warned about
because the value of 1 of them is broken (cast) to be bug for bug
compatible with its format.

There are several more printf format errors hidden under options.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Alpha fatal warning in kernel compile

2002-09-13 Thread Maxime Henrion

Bruce Evans wrote:
  cc1: warnings being treated as errors
  /local0/src2/sys/dev/ccd/ccd.c: In function `ccdiodone':
  /local0/src2/sys/dev/ccd/ccd.c:1181: warning: long long int format, daddr_t arg 
(arg 6)
  *** Error code 1
 
 This is a routine printf format error.  %lld format should only be used
 for printing long longs (which should never be used).  Here the type is
 daddr_t, which happens to be int64_t, which happens to be plain long on
 alphas.
 
 Don't forget to fix the other error in the printf.  2 bio_blkno's are
 printed using 2 different wrong formats, but only 1 is warned about
 because the value of 1 of them is broken (cast) to be bug for bug
 compatible with its format.

I took the liberty to fix those.

Cheers,
Maxime

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Alpha fatal warning in kernel compile

2002-09-12 Thread Kris Kennaway

How are you supposed to disable -Werror in kernel builds?  Setting
NO_WERROR in the env or passing it to 'make buildkernel' via -D
doesn't work; neither does putting -Wno-error in COPTFLAGS.  I get the
following fatal warning when compiling a recent alpha 5.0 kernel under
4.x:

cc -c -O -pipe -Wno-error -mcpu=ev56 -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  
-fformat-extensions -ansi  -nostdinc -I-  -I. -I/local0/src2/sys 
-I/local0/src2/sys/dev -I/local0/src2/sys/contrib/dev/acpica 
-I/local0/src2/sys/contrib/ipfilter -I/local0/src2/sys/../include -D_KERNEL -include 
opt_global.h -fno-common   -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror  
/local0/src2/sys/dev/ccd/ccd.c
cc1: warnings being treated as errors
/local0/src2/sys/dev/ccd/ccd.c: In function `ccdiodone':
/local0/src2/sys/dev/ccd/ccd.c:1181: warning: long long int format, daddr_t arg (arg 6)
*** Error code 1

Kris




msg42944/pgp0.pgp
Description: PGP signature


Re: Alpha fatal warning in kernel compile

2002-09-12 Thread Nate Lawson

On Thu, 12 Sep 2002, Kris Kennaway wrote:
 How are you supposed to disable -Werror in kernel builds?  Setting
 NO_WERROR in the env or passing it to 'make buildkernel' via -D
 doesn't work; neither does putting -Wno-error in COPTFLAGS.  I get the
 following fatal warning when compiling a recent alpha 5.0 kernel under
 4.x:
 
 cc -c -O -pipe -Wno-error -mcpu=ev56 -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  
-fformat-extensions -ansi  -nostdinc -I-  -I. -I/local0/src2/sys 
-I/local0/src2/sys/dev -I/local0/src2/sys/contrib/dev/acpica 
-I/local0/src2/sys/contrib/ipfilter -I/local0/src2/sys/../include -D_KERNEL -include 
opt_global.h -fno-common   -mno-fp-regs -ffixed-8 -Wa,-mev6 -ffreestanding -Werror  
/local0/src2/sys/dev/ccd/ccd.c
 cc1: warnings being treated as errors
 /local0/src2/sys/dev/ccd/ccd.c: In function `ccdiodone':
 /local0/src2/sys/dev/ccd/ccd.c:1181: warning: long long int format, daddr_t arg (arg 
6)
 *** Error code 1
 
 Kris

NO_WERROR was removed so the only way is to set in your make.conf:
WERROR=

This causes the WERROR?=-Werror to not set the flag.

-Nate
(who wants NO_WERROR back or better, warns-clean code more often in
-current)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Alpha fatal warning in kernel compile

2002-09-12 Thread Kris Kennaway

On Thu, Sep 12, 2002 at 01:52:40PM -0700, Nate Lawson wrote:

 NO_WERROR was removed so the only way is to set in your make.conf:
 WERROR=
 
 This causes the WERROR?=-Werror to not set the flag.

Thanks, Bill Fenner also told me this on IRC.  The directions in
/usr/src/UPDATING need to be fixed to reflect this.

 (who wants NO_WERROR back or better, warns-clean code more often in
 -current)

NO_WERROR is standard in userland; it should work in the kernel too.

Kris



msg42946/pgp0.pgp
Description: PGP signature


Re: Alpha fatal warning in kernel compile

2002-09-12 Thread Mike Barcroft

Kris Kennaway [EMAIL PROTECTED] writes:
 On Thu, Sep 12, 2002 at 01:52:40PM -0700, Nate Lawson wrote:
  (who wants NO_WERROR back or better, warns-clean code more often in
  -current)
 
 NO_WERROR is standard in userland; it should work in the kernel too.

Peter removed support for this a while ago.  The easiest way to get
around problems now is to edit sys/conf/files* and add a nowerror for
each affected file.

I think the idea is to force developers to test changes, so that they
hit the errors before the tinderboxes and the rest of the developer
base.  In practice this doesn't stop the determined troublemakers. :)

Best regards,
Mike Barcroft

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Alpha fatal warning in kernel compile

2002-09-12 Thread David O'Brien

On Thu, Sep 12, 2002 at 01:27:50PM -0700, Kris Kennaway wrote:
 How are you supposed to disable -Werror in kernel builds?  Setting
 NO_WERROR in the env or passing it to 'make buildkernel' via -D
 doesn't work; neither does putting -Wno-error in COPTFLAGS.  I get the
 following fatal warning when compiling a recent alpha 5.0 kernel under
 4.x:

Exactly how were you compiling this?  `make buildworld kernel'?  Or just
straight compile of the kernel?  If the latter I would expect that not to
work too much longer as we will end up adding code dependent on GCC 3, or
we'll hit bugs in gcc 2.95 which wont be noticed.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Alpha fatal warning in kernel compile

2002-09-12 Thread Kris Kennaway

On Thu, Sep 12, 2002 at 05:47:29PM -0700, David O'Brien wrote:
 On Thu, Sep 12, 2002 at 01:27:50PM -0700, Kris Kennaway wrote:
  How are you supposed to disable -Werror in kernel builds?  Setting
  NO_WERROR in the env or passing it to 'make buildkernel' via -D
  doesn't work; neither does putting -Wno-error in COPTFLAGS.  I get the
  following fatal warning when compiling a recent alpha 5.0 kernel under
  4.x:
 
 Exactly how were you compiling this?  `make buildworld kernel'?  Or just
 straight compile of the kernel?  If the latter I would expect that not to
 work too much longer as we will end up adding code dependent on GCC 3, or
 we'll hit bugs in gcc 2.95 which wont be noticed.

As stated above it was 'make buildkernel' on the 4.x system.

Kris



msg42956/pgp0.pgp
Description: PGP signature