diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-04-22 01:07:01 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-04-22 11:11:19 +0100 |
commit | 8878c4ef1b88fd07a48ccd7df6bff7ba0929dad7 (patch) | |
tree | f427316aa66d271bfc031d1701629d5e2a69a212 /src/pr.c | |
parent | 01f4065b129c6ad55eef765e701d0e20342867c7 (diff) | |
download | coreutils-8878c4ef1b88fd07a48ccd7df6bff7ba0929dad7.tar.xz |
maint: avoid -Werror=strict-overflow warnings with GCC 5
All warnings were of the form: "assuming signed overflow does not occur
when simplifying conditional to constant [-Werror=strict-overflow]"
* src/dd.c (cache_round): Use an appropriately sized unsigned type,
to avoid possibility of undefined signed overflow.
* src/mknod.c (main): Likewise.
* src/pr.c (pad_down): Likewise.
* src/wc.c (main): Likewise.
* src/tail.c (main): Assert that argc >= 0 thus allowing the
compiler to assume without implication that argc - optind
is positive.
Diffstat (limited to 'src/pr.c')
-rw-r--r-- | src/pr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -438,7 +438,7 @@ static void init_store_cols (void); static void store_columns (void); static void balance (int total_stored); static void store_char (char c); -static void pad_down (int lines); +static void pad_down (unsigned int lines); static void read_rest_of_line (COLUMN *p); static void skip_read (COLUMN *p, int column_number); static void print_char (char c); @@ -2052,9 +2052,9 @@ pad_across_to (int position) Otherwise, use newlines. */ static void -pad_down (int lines) +pad_down (unsigned int lines) { - int i; + unsigned int i; if (use_form_feed) putchar ('\f'); |