summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordejun.xdj <dejun.xdj@alibaba-inc.com>2018-06-28 18:22:06 +0800
committerdejun.xdj <dejun.xdj@alibaba-inc.com>2018-06-28 18:22:06 +0800
commitbde05e9c327bf80debcbbfc047f247f1944c4ff6 (patch)
treeba88eac4e9aed1158afdd6838949ea804e8d203f
parent0b74fd6766b29c2a132828477f4e0f12af85efad (diff)
downloadredis-bde05e9c327bf80debcbbfc047f247f1944c4ff6.tar.gz
Avoid -Woverlength-strings compile warning.
Using another fprintf call to output the rest help message.
-rw-r--r--src/redis-cli.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 51080d08d..3b992f40b 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);
}