develooper Front page | perl.perl5.porters | Postings from June 2010

Re: [perl #74750] fix long int cast warning in toke.c "Deprecated character" warn

Thread Previous
From:
Nicholas Clark
Date:
June 11, 2010 07:30
Subject:
Re: [perl #74750] fix long int cast warning in toke.c "Deprecated character" warn
Message ID:
20100611142959.GB31795@plum.flirble.org
On Wed, Apr 28, 2010 at 02:58:04PM -0700, Richard Soderberg wrote:
> # New Ticket Created by  Richard Soderberg 
> # Please include the string:  [perl #74750]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74750 >
> 
> 
> commit e201a6b870e790ea5550be3cf4dc3c0b4505c406
> Author: Richard Soderberg <rs@topsy.com>
> Date:   Wed Apr 28 14:30:02 2010 -0700
> 
>     fix compilation warning on 64-bit centos 5.2 gcc 4.1.2-42.
> 
>     subtracting two char* pointers returns a ptr_diff_t which is "long int",
>     but sv.c:Perl_sv_vcatpvfn:tryasterisk says va_arg(*args, int),
>     so explicitly cast the ptr_diff_t to int to silence the warning.

Thanks for spotting this, and making a patch.
I didn't realise that there was already a bug open against this (and a patch)
when I recently spotted the compiler warning, so fixed it independently with
b00fc8d41de1694e.

Nicholas Clark

Thread Previous


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