diff options
author | Sami Kerola | 2012-12-28 22:23:43 +0100 |
---|---|---|
committer | Karel Zak | 2013-01-09 13:37:23 +0100 |
commit | e0b06769888484bf2ea047d2fc8a33a3f549b527 (patch) | |
tree | e9be3f61890f150e8e45b806a5f4fe0ac6432732 /sys-utils/losetup.c | |
parent | swapon: default to --show if nothing is requested (diff) | |
download | kernel-qcow2-util-linux-e0b06769888484bf2ea047d2fc8a33a3f549b527.tar.gz kernel-qcow2-util-linux-e0b06769888484bf2ea047d2fc8a33a3f549b527.tar.xz kernel-qcow2-util-linux-e0b06769888484bf2ea047d2fc8a33a3f549b527.zip |
losetup: fix declarations [smatch scan]
sys-utils/losetup.c:309:2: error: 'for' loop initial declarations are only allowed in C99 mode
sys-utils/losetup.c:374: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/losetup.c')
-rw-r--r-- | sys-utils/losetup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index 2765a38bc..2c81e69ba 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -302,11 +302,12 @@ static int make_table(struct loopdev_cxt *lc, const char *file, { struct stat sbuf, *st = &sbuf; struct tt_line *ln; + int i; if (!(tt = tt_new_table(0))) errx(EXIT_FAILURE, _("failed to initialize output table")); - for (int i = 0; i < ncolumns; i++) { + for (i = 0; i < ncolumns; i++) { struct colinfo *ci = get_column_info(i); if (!tt_define_column(tt, ci->name, ci->whint, ci->flags)) @@ -341,6 +342,8 @@ static int make_table(struct loopdev_cxt *lc, const char *file, static void usage(FILE *out) { + size_t i; + fputs(USAGE_HEADER, out); fprintf(out, @@ -371,7 +374,7 @@ static void usage(FILE *out) fputs(USAGE_VERSION, out); fputs(_("\nAvailable --list columns:\n"), out); - for (size_t i = 0; i < NCOLS; i++) + for (i = 0; i < NCOLS; i++) fprintf(out, " %12s %s\n", infos[i].name, _(infos[i].help)); fprintf(out, USAGE_MAN_TAIL("losetup(8)")); |