Tom Lane wrote:

Bruce Momjian <[EMAIL PROTECTED]> writes:


I am seeing the following compile warnings in CVS. I am using for perl:
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:



I believe these two:



plperl.c:948: warning: `ret_hv' might be used uninitialized in this function
plperl.c:949: warning: `ret_av' might be used uninitialized in this function



indicate an actual bug --- at least, it's far from clear that the code
can't try to use an uninitialized value. I trust that the authors of
plperl will step up and fix it; I'm not sufficiently clear on what cases
they are trying to support to want to touch it.



I have just mentally walked through the code and I am fairly sure this is harmless, i.e. we should only refer to the one of these that has actually been set in any of the relevant code paths. I agree it is sloppy and will have discussions with one or two fellow perpetrators er I mean collaborators about cleaning it up.


The others indicate sloppiness in the C code generated by perl's XS
functionality.  There's nothing we can do about them.  FWIW, less
obsolete versions of Perl generate fewer warnings --- the only one of
these that I see on 5.8.0 and up is



SPI.c:158: warning: unused variable `items'




This message can actually be fixed with the addition of the following 2 lines to SPI.xs:

*BOOT*:
   *items* = 0;  /* avoid '*unused **variable*' warning */


These messages are confusing:

/usr/libdata/perl5/5.00503/i386-bsdos/CORE/patchlevel.h:41: warning: 
`local_patches' defined but not used
ppport.h:564: warning: `sv_2pv_nolen' defined but not used
/usr/libdata/perl5/5.00503/i386-bsdos/CORE/patchlevel.h:41: warning: 
`local_patches' defined but not used
ppport.h:564: warning: `sv_2pv_nolen' defined but not used

AFAICT sv_2pv_nolen should actually be used (by SPI.c) on Bruce's machine, so 
it's a bit strange.


cheers


andrew

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to [EMAIL PROTECTED] so that your
     message can get through to the mailing list cleanly

Reply via email to