pgsql: Be more careful about signed vs. unsigned char

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Be more careful about signed vs. unsigned char
Date: 2017-03-16 04:14:00
Message-ID: E1coMnY-0005iY-HT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cccbddeb1483b85f1853a29dc3b6464647b91eee

Modified Files
--------------
src/backend/utils/adt/mac8.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Petr Jelinek 2017-03-16 12:00:54 Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver
Previous Message Stephen Frost 2017-03-16 03:39:49 Re: pgsql: Clean up overly paranoid checks in mac8.c