Subject: | printf warnings from EU:C |
Date: | Sat, 11 Dec 2010 17:17:22 +0000 |
To: | bug-ExtUtils-Constant [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
Many modules that use ExtUtils::Constant get compiler warnings such
as these:
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.12\" -DXS_VERSION=\"1.12\" -fPIC "-I../.." GDBM_File.c
./const-xs.inc: In function 'XS_GDBM_File_AUTOLOAD':
./const-xs.inc:137: warning: format '%d' expects type 'int', but argument 4 has type 'line_t'
./const-xs.inc:142: warning: format '%d' expects type 'int', but argument 4 has type 'line_t'
The arguments being complained of are CopLINE(cop) in
the autogenerated AUTOLOAD xsub. The ultimate source is in
ExtUtils::Constant::ProxySubs::WriteConstants(). The solution is to
explicitly cast these arguments to int.
-zefram