avoid compiler warning in regex matcher

Eric Blake eblake@redhat.com
Wed Feb 29 06:33:00 GMT 2012


On 02/28/2012 05:12 AM, Schwarz, Konrad wrote:
>> @@ -198,7 +198,7 @@ int eflags;
>>
>>  				/* Jump to next possible match */
>>  				mj = matchjump[pp - mustfirst];
>> -				cj = charjump[*dp];
>> +				cj = charjump[(unsigned char)*dp];
>>  				dp += (cj < mj ? mj : cj);
>>  				pp = mustlast;
>>  			}
> 
> Wouldn't it be less source and object code to define dp as
> an unsigned char *?

Perhaps; I'll work up that counter-proposal patch, and we can see which
one looks better before I push anything (my fear is that changing the
type of dp may have ripple effects on how many lines of code need touching).

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20120229/81be1222/attachment.sig>


More information about the Newlib mailing list