When building Pigeonhole 2.2 for ARM, the following warnings are produced:
uri-mailto.c: In function '_parse_hex_value': uri-mailto.c:139: warning: comparison is always false due to limited range of data type uri-mailto.c:145: warning: comparison is always false due to limited range of data type
The problem is a test assuming that char is a signed type :
Indeed. This is what I would call a programming atrocity. Notice the return type casts in the _decode_hex_digit function; no idea why the actual return type was char.
This is untested, but I changed the "char value" to "int value" to correct the signed comparisons. There are no warnings when building for x86 in either case, btw.
That is a good fix. I did it a little more elaborate though:
http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/8a07ae3e0a2e
Also, the two tests for "**in == '\0'" seem to be unnecessary?
Yes, that too.
Regards,
Stephan.