Avoid -Woverlength-strings compile warning.

Using another fprintf call to output the rest help message.
This commit is contained in:
dejun.xdj 2018-06-28 18:22:06 +08:00
parent 0b74fd6766
commit bde05e9c32

View File

@ -1467,7 +1467,10 @@ static void usage(void) {
" line interface.\n" " line interface.\n"
" --help Output this help and exit.\n" " --help Output this help and exit.\n"
" --version Output version 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" "Cluster Manager Commands:\n"
" Use --cluster help to list all available cluster manager commands.\n" " Use --cluster help to list all available cluster manager commands.\n"
"\n" "\n"
@ -1484,8 +1487,7 @@ static void usage(void) {
"When no command is given, redis-cli starts in interactive mode.\n" "When no command is given, redis-cli starts in interactive mode.\n"
"Type \"help\" in interactive mode for information on available commands\n" "Type \"help\" in interactive mode for information on available commands\n"
"and settings.\n" "and settings.\n"
"\n", "\n");
version, REDIS_CLI_DEFAULT_PIPE_TIMEOUT);
sdsfree(version); sdsfree(version);
exit(1); exit(1);
} }