diff options
author | Sami Kerola | 2012-10-08 09:08:20 +0200 |
---|---|---|
committer | Karel Zak | 2012-10-15 16:53:59 +0200 |
commit | e09bd8d0c54053c5c3f977cea633c6c69f2c6e1a (patch) | |
tree | ab70d072a45a42a75ad69f91108f077ecd4a6da1 /sys-utils/swapon.c | |
parent | more: remove few memory leaks (diff) | |
download | kernel-qcow2-util-linux-e09bd8d0c54053c5c3f977cea633c6c69f2c6e1a.tar.gz kernel-qcow2-util-linux-e09bd8d0c54053c5c3f977cea633c6c69f2c6e1a.tar.xz kernel-qcow2-util-linux-e09bd8d0c54053c5c3f977cea633c6c69f2c6e1a.zip |
swapon: remove loop declaration [smatch scan]
sys-utils/swapon.c:677:2: error: 'for' loop initial declarations are
only allowed in C99 mode
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/swapon.c')
-rw-r--r-- | sys-utils/swapon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 0490cd0ad..40df5220c 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -642,6 +642,7 @@ static int swapon_all(void) static void __attribute__ ((__noreturn__)) usage(FILE * out) { + size_t i; fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options] [<spec>]\n"), program_invocation_short_name); @@ -674,7 +675,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) " <file> name of file to be used\n"), out); fputs(_("\nAvailable columns (for --show):\n"), out); - for (size_t i = 0; i < NCOLS; i++) + for (i = 0; i < NCOLS; i++) fprintf(out, " %4s %s\n", infos[i].name, _(infos[i].help)); fprintf(out, USAGE_MAN_TAIL("swapon(8)")); |