Samba4, latest build fails: wrong int and long int casts

Moritz Mühlenhoff muehlenhoff at univention.de
Wed Aug 1 08:50:56 MDT 2012


Hi Jelmer,

> > [2493/4244] Compiling source4/heimdal/lib/com_err/error.c
> > ../source4/heimdal/lib/com_err/error.c: In function ‘com_right_r’:
> > ../source4/heimdal/lib/com_err/error.c:68:6: error: format ‘%d’
> > expects argument of type ‘int’, but argument 4 has type ‘long int’
> > [-Werror=format]
> > ../source4/heimdal/lib/com_err/error.c:68:6: error: format ‘%d’
> > expects argument of type ‘int’, but argument 4 has type ‘long int’
> > [-Werror=format]
> > cc1: some warnings being treated as errors
> > Waf: Leaving directory `/home/steve/samba-master/bin'
> > Build failed: -> task failed (err #1):
> > {task: cc error.c -> error_128.o}
> > make: *** [install] Error 1
> 
> How are you ending up with -Werror=format in your compilation flags?
> As far as I know Samba doesn't add that.

Ubuntu carries patches to enable -Werror=format (and some other hardening
options) in the default compiler/linker flags:
https://wiki.ubuntu.com/ToolChain/CompilerFlags

Cheers,
Moritz
-- 
Moritz Mühlenhoff                         muehlenhoff at univention.de
Open Source Software Engineer
Univention GmbH  be open.                        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  28359 Bremen          fax: +49 421 22 232-99
http://www.univention.de


More information about the samba-technical mailing list