Re: [perl #28868] [PATCH] signedness tweak for string.c:

2004-04-17 Thread Leopold Toetsch
Jarkko Hietaniemi [EMAIL PROTECTED] wrote:

 The attached patch lazily changes both offs and d to unsigned, which
 seems to fine by the Tru64 cc.

Thanks, applied.
leo


[perl #28868] [PATCH] signedness tweak for string.c:

2004-04-16 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #28868]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=28868 


In Tru64 I got a compilation warning from the src/string.c:

cc: Warning: src/string.c, line 2977: In this statement, the referenced
type of the pointer value offs is int, which is not compatible with
unsigned int because they differ by signed/unsigned attribute.
(ptrmismatch1)
r = string_unescape_one(char_at, offs, result-strlen, result);
-^

The attached patch lazily changes both offs and d to unsigned, which
seems to fine by the Tru64 cc.

-- 
Jarkko Hietaniemi [EMAIL PROTECTED] http://www.iki.fi/jhi/ There is this special
biologist word we use for 'stable'.  It is 'dead'. -- Jack Cohen

--- src/string.c.dist   2004-04-16 20:21:27.0 +0300
+++ src/string.c2004-04-16 20:21:50.0 +0300
@@ -2956,7 +2956,7 @@
 {
 size_t clength = strlen(cstring);
 STRING *result;
-int offs, d;
+unsigned int offs, d;
 Parrot_UInt4 r;
 Parrot_unescape_cb char_at;
 char_setter_func set_char_at;