summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-12-01 23:04:36 +0000
committerPádraig Brady <P@draigBrady.com>2014-12-02 01:20:39 +0000
commita6d979299717e3769debfa5d295cb2934683077b (patch)
treec2f56be45168d188b109fd2b7af07fa2e5bbc8de /gl
parentdc1c0523a61932fb0c26a795b7e7391eadf2171a (diff)
downloadcoreutils-a6d979299717e3769debfa5d295cb2934683077b.tar.xz
maint: avoid signed overflow warning with -O3
Prompted by the implicit -O3 added by american-fuzzy-lop, seen with GCC 4.9.2 on x86_64. src/pr.c: In function 'print_files.part.5': src/pr.c:1781:6: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] if (cols_ready_to_print () == 0) This happens because cols_ready_to_print() is inlined thus reducing the comparison to the N variable in print_page(). Now this can't overflow due to the protection when parsing the specified column, but use an unsigned type to avoid the apparent signed overflow. * src/pr.c (cols_ready_to_print): Increment an unsigned type to avoid the subsequent signed overflow warning.
Diffstat (limited to 'gl')
0 files changed, 0 insertions, 0 deletions