]> granicus.if.org Git - postgresql/commit
Suppress compiler warnings about useless comparison of unsigned to zero.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Feb 2016 22:11:52 +0000 (17:11 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Feb 2016 22:11:52 +0000 (17:11 -0500)
commite3ad502740e818335a930c38528b747edebf3684
tree4471568c7e4f342602d0512c03c6f63820c4f150
parent4492ab53b360eaebbd5bcfec2fb36d753da3e199
Suppress compiler warnings about useless comparison of unsigned to zero.

Reportedly, some compilers warn about tests like "c < 0" if c is unsigned,
and hence complain about the character range checks I added in commit
3bb3f42f3749d40b8d4de65871e8d828b18d4a45.  This is a bit of a pain since
the regex library doesn't really want to assume that chr is unsigned.
However, since any such reconfiguration would involve manual edits of
regcustom.h anyway, we can put it on the shoulders of whoever wants to
do that to adjust this new range-checking macro correctly.

Per gripes from Coverity and Andres.
src/backend/regex/regc_lex.c
src/include/regex/regcustom.h