Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] New compile warnings

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,"Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] New compile warnings
Date: 2004-11-21 20:57:11
Message-ID: 41A10127.2020802@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Tom Lane wrote:

>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> 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 don't currently have the resources to clean this up properly. The 
attached patch tries to make clear in a comment what the code is doing, 
and also initializes these variables to NULL. If someone wants to take a 
stab at cleaning this up they are welcome to - I don't expect to be able 
to for quite a while.

>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'
>>    
>>
>
>	
>  
>

The patch also addresses this issue.

cheers

andrew

Attachment: plperl.patch
Description: text/x-patch (1.9 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-11-21 22:14:39
Subject: Re: New compile warnings
Previous:From: James William PyeDate: 2004-11-21 20:06:03
Subject: Re: Preventing some SQL commands

pgsql-patches by date

Next:From: Tom LaneDate: 2004-11-21 22:14:39
Subject: Re: New compile warnings
Previous:From: Alvaro HerreraDate: 2004-11-21 14:16:56
Subject: Re: There are any version that works on Windows 2000

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group