On Thu, Jul 18, 2013 at 06:32:43PM -0700, "Tony Cook via RT" wrote: > On Thu Jul 18 11:57:36 2013, bulk88 wrote: > > On Sun Jul 07 23:53:42 2013, tonyc wrote: > > > > > > Tony > > > > > > > Patch remade, newSVpvn and %d replaced with %zu to hopefully (not using > > GCC) stop type mismatch warning. > > > > Thanks for the newSVpvn change, unfortunately the format string error > remains: > > CCCMD = cc -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURCE > -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall -ansi -W > -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat > -Wwrite-strings > perl.c: In function ‘S_minus_v’: > perl.c:3600:9: warning: format ‘%s’ expects argument of type ‘char *’, > but argument 3 has type ‘long unsigned int’ [-Wformat] > > >From clang: > > perl.c:3555:9: warning: format specifies type 'char *' but the argument > has type > 'size_t' (aka 'unsigned long') [-Wformat] > INT2PTR(size_t, LOCAL_PATCH_COUNT), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ./perl.h:1630:26: note: expanded from macro 'INT2PTR' > # define INT2PTR(any,d) (any)(d) > ^~~~~~~~ > Note that ANSI C doesn't guarantee that size_t and pointers are the same > size, though I can only think an obsolete platform (Win16 large model) > where they are different sizes. I confess I didn't dig through the code to figure out why this was a problem, but in my view, for simply printing out copyright messages, I don't see the value in fighting portability battles. Just keep it simple. -- Andy Dougherty doughera@lafayette.eduThread Previous | Thread Next