Skip Menu |

This queue is for tickets about the Convert-UUlib CPAN distribution.

Report information
The Basics
Id: 23884
Status: rejected
Priority: 0/
Queue: Convert-UUlib

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.07



Subject: Build warnings
'make' produces the following warnings: gcc -c -DPERL_USE_SAFE_PUTENV -DPERL_DONT_CREATE_GVSV -DNO_MATHOMS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -DUSEIMPORTLIB -O3 -pipe -funit-at-a-time -mtune=pentium4m -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2 -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" "-I/usr/lib/perl5/5.8/cygwin/CORE" UUlib.c UUlib.c: In function `XS_Convert__UUlib__Item_rename': UUlib.c:952: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_decode_temp': UUlib.c:983: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_remove_temp': UUlib.c:1014: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_decode': UUlib.c:1046: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_info': UUlib.c:1082: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_state': UUlib.c:1112: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_mode': UUlib.c:1144: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_uudet': UUlib.c:1183: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_size': UUlib.c:1214: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_filename': UUlib.c:1246: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_subfname': UUlib.c:1288: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_mimeid': UUlib.c:1319: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_mimetype': UUlib.c:1350: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_binfile': UUlib.c:1381: warning: cast to pointer from integer of different size UUlib.c: In function `XS_Convert__UUlib__Item_parts': UUlib.c:1412: warning: cast to pointer from integer of different size These can be traced to an improper cast in the 'typemap' file. The attached patch fixes this.
Subject: uulib.patch
diff -urN Convert-UUlib-patched/typemap Convert-UUlib-1.07/typemap --- Convert-UUlib-patched/typemap 2006-12-11 08:34:58.000000000 -0500 +++ Convert-UUlib-1.07/typemap 2005-03-03 11:56:46.000000000 -0500 @@ -5,7 +5,7 @@ T_UULIST if (sv_derived_from($arg, \"Convert::UUlib::Item\")) { IV tmp = SvIV((SV*)SvRV($arg)); - $var = INT2PTR($type, tmp); + $var = ($type) tmp; } else croak(\"$var is not of type Convert::UUlib::Item\")
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #23884] Build warnings
Date: Mon, 11 Dec 2006 15:45:07 +0100
To: "Jerry D. Hedden via RT" <bug-Convert-UUlib [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Mon, Dec 11, 2006 at 08:39:24AM -0500, "Jerry D. Hedden via RT" <bug-Convert-UUlib@rt.cpan.org> wrote: Show quoted text
> 'make' produces the following warnings:
Those warnings are harmless and can safely be ignored. (In general, one shouldn't enable warnings unless one knows how to interpret them). Show quoted text
> These can be traced to an improper cast in the 'typemap' file. The > attached patch fixes this.
There is nothing improper with the cast. Again, you should not enable warnings until you really understand them, as they are often wrong. That is why warnings are wanrings and no errors. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
Show quoted text
> There is nothing improper with the cast.
perl.h has a macro that is meant to be used for just this purpose. It does the 'cast' in such a way that the compiler does not generate warnings. The macro is INT2PTR, and you'll see in the patch that it is only a one line change in the 'typemap' file: diff -urN Convert-UUlib-patched/typemap Convert-UUlib-1.07/typemap --- Convert-UUlib-patched/typemap 2006-12-11 08:34:58.000000000 -0500 +++ Convert-UUlib-1.07/typemap 2005-03-03 11:56:46.000000000 -0500 @@ -5,7 +5,7 @@ T_UULIST if (sv_derived_from($arg, \"Convert::UUlib::Item\")) { IV tmp = SvIV((SV*)SvRV($arg)); - $var = INT2PTR($type, tmp); + $var = ($type) tmp; } else croak(\"$var is not of type Convert::UUlib::Item\") After applying this patch, 'make' no longer generates the warnings that I listed. This indicates that the macro is 'doing the right thing'. Is there some reason why you think the developers of Perl are wrong in providing the INT2PTR macro? Do you have some justification for not wanting to use it?
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #23884] Build warnings
Date: Mon, 11 Dec 2006 17:36:04 +0100
To: "Jerry D. Hedden via RT" <bug-Convert-UUlib [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Mon, Dec 11, 2006 at 10:36:20AM -0500, "Jerry D. Hedden via RT" <bug-Convert-UUlib@rt.cpan.org> wrote: Show quoted text
> > There is nothing improper with the cast.
> > Is there some reason why you think the developers of Perl > are wrong in providing the INT2PTR macro?
Thats a logical fallacy, there obviously cannot be a reason why I think that. Is there a reason why you are trying to bullshit people by using unfair accusations, logical fallacies and illogical statements? Show quoted text
> Do you have some justification for not wanting to use it?
I do not need justification for not changing perfectly working code. It just makes no sense. If you happen to have something sensible to say in the future, please try. Until then, there is no point in continuing this communication, as you have nothing to say. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE