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

[email protected] (Nicholas Clark)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
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 <[email protected]>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.