From bde05e9c327bf80debcbbfc047f247f1944c4ff6 Mon Sep 17 00:00:00 2001 From: "dejun.xdj" Date: Thu, 28 Jun 2018 18:22:06 +0800 Subject: [PATCH] Avoid -Woverlength-strings compile warning. Using another fprintf call to output the rest help message. --- src/redis-cli.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 51080d08..3b992f40 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1467,7 +1467,10 @@ static void usage(void) { " line interface.\n" " --help Output this help and exit.\n" " --version Output version and exit.\n" -"\n" +"\n", + version, REDIS_CLI_DEFAULT_PIPE_TIMEOUT); + /* Using another fprintf call to avoid -Woverlength-strings compile warning */ + fprintf(stderr, "Cluster Manager Commands:\n" " Use --cluster help to list all available cluster manager commands.\n" "\n" @@ -1484,8 +1487,7 @@ static void usage(void) { "When no command is given, redis-cli starts in interactive mode.\n" "Type \"help\" in interactive mode for information on available commands\n" "and settings.\n" -"\n", - version, REDIS_CLI_DEFAULT_PIPE_TIMEOUT); +"\n"); sdsfree(version); exit(1); }