From: Theodore Ts'o Date: Tue, 17 Aug 2021 19:45:49 +0000 (-0400) Subject: tests: fix "format not a string literal" -Wall warning in test_icount X-Git-Tag: v1.46.4~4 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b926292bcc0bb837961ce79505034eaaf53d8f9a;p=tools%2Fe2fsprogs.git tests: fix "format not a string literal" -Wall warning in test_icount Signed-off-by: Theodore Ts'o --- diff --git a/tests/progs/test_icount.c b/tests/progs/test_icount.c index 8b01ea4..6ebb100 100644 --- a/tests/progs/test_icount.c +++ b/tests/progs/test_icount.c @@ -109,13 +109,12 @@ void do_free_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { - const char *usage = "usage: %s inode\n"; errcode_t retval; ext2_ino_t ino; __u16 count; if (argc < 2) { - printf(usage, argv[0]); + printf("usage: %s inode\n", argv[0]); return; } if (check_icount(argv[0])) @@ -133,13 +132,12 @@ void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { - const char *usage = "usage: %s inode\n"; errcode_t retval; ext2_ino_t ino; __u16 count; if (argc < 2) { - printf(usage, argv[0]); + printf("usage: %s inode\n", argv[0]); return; } if (check_icount(argv[0])) @@ -158,13 +156,12 @@ void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { - const char *usage = "usage: %s inode\n"; errcode_t retval; ext2_ino_t ino; __u16 count; if (argc < 2) { - printf(usage, argv[0]); + printf("usage: %s inode\n", argv[0]); return; } if (check_icount(argv[0])) @@ -183,13 +180,12 @@ void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void do_store(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { - const char *usage = "usage: %s inode count\n"; errcode_t retval; ext2_ino_t ino; ext2_ino_t count; if (argc < 3) { - printf(usage, argv[0]); + printf("usage: %s inode count\n", argv[0]); return; } if (check_icount(argv[0]))