[PATCH] fsck: fix clang compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fsck.c:874:22: warning: format string is not a string literal
      (potentially insecure) [-Wformat-security]
				errx(EXIT_USAGE, _(fs_type_syntax_error));
						 ^~~~~~~~~~~~~~~~~~~~~~~

The issue was introduced in my commit 0a09eb4e, sorry.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 fsck/fsck.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fsck/fsck.c b/fsck/fsck.c
index effc866..0d5feda 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -819,10 +819,6 @@ struct fs_type_compile {
 #define FS_TYPE_OPT	1
 #define FS_TYPE_NEGOPT	2
 
-static const char *fs_type_syntax_error =
-N_("Either all or none of the filesystem types passed to -t must be prefixed\n"
-   "with 'no' or '!'.\n");
-
 static void compile_fs_type(char *fs_type, struct fs_type_compile *cmp)
 {
 	char 	*cp, *list, *s;
@@ -871,7 +867,9 @@ static void compile_fs_type(char *fs_type, struct fs_type_compile *cmp)
 			}
 			if ((negate && !cmp->negate) ||
 			    (!negate && cmp->negate)) {
-				errx(EXIT_USAGE, _(fs_type_syntax_error));
+				errx(EXIT_USAGE,
+					_("Either all or none of the filesystem types passed to -t must be prefixed\n"
+					  "with 'no' or '!'."));
 			}
 		}
 #if 0
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux