Be more careful about signed vs. unsigned char

Stephen Frost <sfrost@snowman.net>

Commit: cccbddeb1483b85f1853a29dc3b6464647b91eee
Author: Stephen Frost <sfrost@snowman.net>
Date: 2017-03-16T04:13:37Z
Releases: 10.0
Be more careful about signed vs. unsigned char

The buildfarm has reminded me that not all systems consider char to be
signed and we need to be explicit.  Adjust the various bits of mac8.c
for what we intend, mostly using casts to unsigned char as suggested by
Tom, and adjust the tests for valid input accordingly.  Explicitly make
the hexlookup table signed as it's useful to use -1 there to indicate an
invalid value.

Files

PathChange+/−
src/backend/utils/adt/mac8.c modified +14 −14