summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-10-03 00:24:43 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-10-03 00:32:34 -0700
commitf689642bac132e189d0c0960c171ae9043a37298 (patch)
treebd7b30736bbf8d27f4f2ea0425dfb31ace4a5aac /src/df.c
parent3ba68f9e64fa2eb8af22d510437a0c6441feb5e0 (diff)
downloadcoreutils-f689642bac132e189d0c0960c171ae9043a37298.tar.xz
build: Pacify GCC 5 on 32-bit hosts
This pacifies GCC 5 in a better way, without disabling diagnostics. * src/df.c (main): Tell compiler that optind is positive. * src/shred.c (known): New function. (dopass): Go back to off_t for file sizes. Avoid integer overflow if we run off the end of the file. Tell compiler that a write cannot write more bytes than requested.
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/df.c b/src/df.c
index 17a2de437..507a0f734 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1650,6 +1650,8 @@ main (int argc, char **argv)
return EXIT_FAILURE;
}
+ assume (0 < optind);
+
if (optind < argc)
{
int i;