develooper Front page | perl.perl5.porters | Postings from August 2001

warning in sv.c: double format, NV arg

Thread Next
From:
Philip Newton
Date:
August 5, 2001 10:34
Subject:
warning in sv.c: double format, NV arg
Message ID:
perl.perl5.porters-41418@nntp.perl.org
Hi, I downloaded the perl-5.7.2 sources recently and tried to build
them. There were quite a few warnings while Configure was running
(especially about implicit definition of 'exit'), but also a couple
during the build itself:

sv.c: In function `Perl_sv_2iv':
sv.c:2060: warning: double format, NV arg (arg 4)
sv.c:2071: warning: double format, NV arg (arg 4)
sv.c: In function `Perl_sv_2uv':
sv.c:2354: warning: double format, NV arg (arg 4)
sv.c:2365: warning: double format, NV arg (arg 4)

and

taint.c: In function `Perl_taint_proper':
taint.c:18: warning: long unsigned int format, uid_t arg (arg 5)
taint.c:18: warning: long unsigned int format, uid_t arg (arg 6)

This is on a Linux machine with use64bitall (actually only 64bitint
since there are no 64-bit pointers on x86, but I had passed
-Duse64bitall to Configure).

I'm attaching a patch that causes sv.c to compile without
warning on my machine. (I don't want to copy-and-paste it
because of tabs in the sources.)

I'm not sure what to do with the warning in taint.c. Partly
because I can't figure out what type uid_t is on this
machine; a quick recursive grep of /usr/include/* didn't
show anything likely. So I don't know what format the
compiler wants for a uid_t under -Wall. (Perhaps the result
has to be cast to, say, an unsigned long explicitly?)

Cheers,
Philip
-- 
Philip Newton <Philip.Newton@gmx.net>

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About