diff options
author | Andreas Dilger <adilger@dilger.ca> | 2013-12-15 22:11:40 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-12-15 22:12:16 -0500 |
commit | 45ff69ffeb700012a7c052f5e45882557a40be7e (patch) | |
tree | ae908ef6f96b8085e084449f08f75ebe208a6641 /e2fsck/util.c | |
parent | 3a941bef3b9036ca3db9d510c71bcae801ea4dd1 (diff) | |
download | android_external_e2fsprogs-45ff69ffeb700012a7c052f5e45882557a40be7e.tar.gz android_external_e2fsprogs-45ff69ffeb700012a7c052f5e45882557a40be7e.tar.bz2 android_external_e2fsprogs-45ff69ffeb700012a7c052f5e45882557a40be7e.zip |
build: quiet LLVM non-literal string format warning
Compiling with LLVM generates a large number of warnings due
to the use of _() for wrapping strings for i18n:
warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
./nls-enable.h:4:14: note: expanded from macro '_'
#define _(a) (gettext (a))
^~~~~~~~~~~~
These warnings are fixed by using "%s" as the format string,
and then _() is used as the string argument.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck/util.c')
-rw-r--r-- | e2fsck/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/e2fsck/util.c b/e2fsck/util.c index c9e2ca16..eb3e0f45 100644 --- a/e2fsck/util.c +++ b/e2fsck/util.c @@ -220,7 +220,7 @@ int ask_yn(e2fsck_t ctx, const char * string, int def) log_out(ctx, "\n"); longjmp(e2fsck_global_ctx->abort_loc, 1); } - log_out(ctx, _("cancelled!\n")); + log_out(ctx, "%s", _("cancelled!\n")); return 0; } if (strchr(short_yes, (char) c)) { @@ -235,9 +235,9 @@ int ask_yn(e2fsck_t ctx, const char * string, int def) break; } if (def) - log_out(ctx, _("yes\n")); + log_out(ctx, "%s", _("yes\n")); else - log_out(ctx, _("no\n")); + log_out(ctx, "%s", _("no\n")); #ifdef HAVE_TERMIOS_H tcsetattr (0, TCSANOW, &termios); #endif @@ -633,7 +633,7 @@ errcode_t e2fsck_zero_blocks(ext2_filsys fs, blk_t blk, int num, if (!buf) { buf = malloc(fs->blocksize * STRIDE_LENGTH); if (!buf) { - com_err("malloc", ENOMEM, + com_err("malloc", ENOMEM, "%s", _("while allocating zeroizing buffer")); exit(1); } |