List Info

Thread: Re: Change 31309: Silence a couple of VC++ compiler warnings




Re: Change 31309: Silence a couple of VC++ compiler warnings
user name
2007-05-30 03:47:31
Steve Hay wrote in perl.perl5.changes :
> Change 31309 by stevehmugwump on 2007/05/30
07:38:30
>
> 	Silence a couple of VC++ compiler warnings

Failed Test                               Stat Wstat Total
Fail  List of Failed
------------------------------------------------------------
-------------------
../ext/Math/BigInt/FastCalc/t/bigintfc.t     2   512   359 
718  1-359
../ext/Math/BigInt/FastCalc/t/bootstrap.t    2   512     1  
 2  1
../ext/Math/BigInt/FastCalc/t/leak.t       255 65280    22  
44  1-22

I don't know why. Maybe this should be a signed integer
after all?
What are the warnings you're getting?

>==== //depot/perl/ext/Math/BigInt/FastCalc/FastCalc.xs#7
(text) ====
> Index: perl/ext/Math/BigInt/FastCalc/FastCalc.xs
> ---
perl/ext/Math/BigInt/FastCalc/FastCalc.xs#6~31284~	2007-05-2
8 02:45:39.000000000 -0700
> +++
perl/ext/Math/BigInt/FastCalc/FastCalc.xs	2007-05-30
00:38:30.000000000 -0700
>  -53,7 +53,7 
>    INIT:
>      STRLEN len;
>      char* cur;
> -    int part_len;
> +    STRLEN part_len;
>  
>    CODE:
>      /* create the array */
>  -78,7 +78,7 
>        while (len > 0)
>          {
>          /* use either BASE_LEN or the amount of
remaining digits */
> -        part_len = XS_BASE_LEN;
> +        part_len = (STRLEN) XS_BASE_LEN;
>          if (part_len > len)
>            {
>            part_len = len;
> End of Patch.

Re: Change 31309: Silence a couple of VC++ compiler warnings
user name
2007-05-30 03:57:53
Rafael Garcia-Suarez wrote:
> Steve Hay wrote in perl.perl5.changes :
>> Change 31309 by stevehmugwump on 2007/05/30
07:38:30
>>
>> 	Silence a couple of VC++ compiler warnings
> 
> Failed Test                               Stat Wstat
Total Fail  List of Failed
>
------------------------------------------------------------
-------------------
> ../ext/Math/BigInt/FastCalc/t/bigintfc.t     2   512  
359  718  1-359
> ../ext/Math/BigInt/FastCalc/t/bootstrap.t    2   512   
 1    2  1
> ../ext/Math/BigInt/FastCalc/t/leak.t       255 65280   
22   44  1-22
> 
> I don't know why. Maybe this should be a signed integer
after all?
> What are the warnings you're getting?

Sorry about that. These tests definitely pass on my system
with the 
patch applied, though.

The warnings were:

FastCalc.xs(80) : warning C4244: '=' : conversion from
'double' to 
'int', possible loss of data
FastCalc.xs(81) : warning C4018: '>' : signed/unsigned
mismatch

-- 

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )