chiark / gitweb /
Fix a compile warning on ARM.
authorSimon Tatham <anakin@pobox.com>
Tue, 24 Mar 2015 19:20:03 +0000 (19:20 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 24 Mar 2015 19:20:03 +0000 (19:20 +0000)
commit195217a48062c3ee64a47b1d0b5327e5838a105c
tree3cfaa978f9f8bea8085b6b5d844ce8f506c1030a
parent05b533d1f899e448fae25e27614543147f9acffa
Fix a compile warning on ARM.

Aapo Rantalainen points out that comparing 'char c' against zero gives
rise to gcc's "comparison is always false" warning, which escalates to
an error under -Werror.

This is one of those situations where the warning is doing more harm
than good, but here's a rephrasing which casts to unsigned so that
both negative numbers and positive out-of-range ones can be caught by
the same comparison.
flood.c