build failure on netbsd-5 with gtk2+-2.20.1nb

Bastien Nocera hadess at hadess.net
Wed Jun 30 03:53:19 PDT 2010


On Sat, 2010-06-26 at 08:19 -0400, Greg Troxel wrote: 
> Bastien Nocera <hadess at hadess.net> writes:
<snip> 
> > Did you compile glib (or did you get a glib from your distro) without
> > warnings enabled?
> 
> glib2 is from pkgsrc, and I am pretty sure it doesn't disable warnings.
> 
> I read gmessage.h and I see what you mean.  However, it's reasonable for
> a compiler to err on the safe side and complain about a variable which
> is not 100% clearly only used when initialized.
> 
> Plus, unless geoclue checks and fails to build if warnings are off, it
> needs to check properly. It seems g_return_val_if_fail is meant to
> support eiffel-style design-by-contract, and to document the rules
> (always) and enforce them (warnings on, which seems default).
> 
> It seems easy enough to set the offending variable to NULL to avoid
> this.

Except that's working around a compiler bug. You're more than welcome
patching this for your distribution of the package, but I don't see why
we should put work-arounds that might hide bugs later in geoclue. 



More information about the GeoClue mailing list