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 /misc/chattr.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 'misc/chattr.c')
-rw-r--r-- | misc/chattr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/chattr.c b/misc/chattr.c index 6bb33e68..39a60169 100644 --- a/misc/chattr.c +++ b/misc/chattr.c @@ -263,8 +263,9 @@ static int chattr_dir_proc (const char * dir_name, struct dirent * de, path = malloc(strlen (dir_name) + 1 + strlen (de->d_name) + 1); if (!path) { - fprintf(stderr, _("Couldn't allocate path variable " - "in chattr_dir_proc")); + fprintf(stderr, "%s", + _("Couldn't allocate path variable " + "in chattr_dir_proc")); return -1; } sprintf(path, "%s/%s", dir_name, de->d_name); |