Subject: Re: making firefox LP64 clean
To: Michael Kukat <michael@bsdfans.org>
From: Dieter <netbsd@sopwith.solgatos.com>
List: port-alpha
Date: 11/25/2004 23:22:29
> > I've compiled firefox-1.0 on alpha, and there are no shortage
> > of compiler warnings.  Greping for warning in make.out yields
> > 13990 lines.  (not counting those from gtk).
> 
> How many are pointer <> int conversions? *eg*

After my 1st round of fixes I get:

 10605 alignment
   121 uninitialized
    76 unused variable
   332 /db/
   198 was hidden
   207  by 
     8 usually a function
   394 ANSI
   742 /js/
     5 no effect
     7 clobbered
    15 choosing
    15 for conversion from
    15 because conversion sequ
   122 bracketed initializer
    30 previous definition
    30 redefined
    30 defined but not used
     2 is not used
    32 comparison between signed and unsigned
     6 large integer implicitly truncated to unsigned type
     8 not handled in switch
     3 overflow in implicit constant conversion
    61   misc (other than the above)

There are no longer any "prototype" or "implicit declaration" warnings.
I did these first since "fixing" type warnings before fixing the
prototype/declaration warnings can actually introduce bugs.

The only "pointer" warnings left are 70 in /js/
	57	"cast from pointer to integer"
	13	"cast to pointer from integer"

> -Wall -Werror. But this will be a real lot of work...

I've been using:

	/usr/bin/gcc -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes
	 -Wpointer-arith -Wuninitialized -Wimplicit -Wreturn-type -Wformat
	 -D__STDC__=1 -Dunix $@

(and the same for g++)

This really would take forever with Werror.  I fixed hundreds of prototype/declaration
warnings between compiles.

> Do you use the pkgsrc firefox for your efforts?

No, I started with the firefox-1.0 tar file from mozilla.org.