summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.c
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2012-12-14 10:48:46 +0100
committergluster-ant <bugzilla-bot@gluster.org>2012-12-14 10:48:46 +0100
commitd71aaaacc55abaa76a080277905984b7dddf9f85 (patch)
treef2a26855360832b5692594edab1b9bc4ecbecbe4 /cli/src/cli.c
parenta142e0916bd1500326da41d99d6fbbc8f85b4125 (diff)
Fix format security errors with hardening build flags
These problems were found while building with the hardening options used by Debian. In order to prevent introducing new unsafe constructs, the options -Wformat" and -Werror=format-security are addeded to the CFLAGS by configure.ac if the compiler supports them. Also, a small spelling fix in posix-aio.c is included. Change-Id: I1034311644fa3c21bc5a7b842c41a3ca79108b3f BUG: 887278 Original-author: Patrick Matthäi <pmatthaei@debian.org> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4311 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r--cli/src/cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index a2457c2b6b..4ff1728059 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -298,12 +298,12 @@ cli_opt_parse (char *opt, struct cli_state *state)
return 1;
if (strcmp (opt, "version") == 0) {
- cli_out (argp_program_version);
+ cli_out ("%s", argp_program_version);
exit (0);
}
if (strcmp (opt, "print-logdir") == 0) {
- cli_out (DEFAULT_LOG_FILE_DIRECTORY);
+ cli_out ("%s", DEFAULT_LOG_FILE_DIRECTORY);
exit (0);
}