]> arthur.barton.de Git - bup.git/commit
_helpers: fix -Wsign-compare warnings
authorRob Browning <rlb@defaultvalue.org>
Sat, 30 Nov 2019 18:09:04 +0000 (12:09 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 30 Nov 2019 22:13:35 +0000 (16:13 -0600)
commit03a81e998505a09d41ece590993eb289bef5e3fd
tree44aa32df70c54db1a3f4baaa81d181b2ed691e6a
parentcb43bf61b85cff9304891c439ab0b295fd3bc5ea
_helpers: fix -Wsign-compare warnings

Python 3 adds -Wsign-compare to the compiler arguments.  Address the
issues that this causes gcc to warn about.  Disable the warnings for
the INTEGRAL_ASSIGNMENT_FITS macro since it's intentionally doing
something that the compiler can't tell is OK (assuming it is), add
some simple tests, and change the types and code in other places to
avoid the suspect comparisons.  Currently clang doesn't produce the
warnings.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c