Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
24b09422
Commit
24b09422
authored
Mar 19, 2012
by
antirez
Browse files
Suppress warnings compiling redis-cli with certain gcc versions.
parent
ea693f02
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
24b09422
...
@@ -478,7 +478,7 @@ static sds cliFormatReplyCSV(redisReply *r) {
...
@@ -478,7 +478,7 @@ static sds cliFormatReplyCSV(redisReply *r) {
static int cliReadReply(int output_raw_strings) {
static int cliReadReply(int output_raw_strings) {
void *_reply;
void *_reply;
redisReply *reply;
redisReply *reply;
sds
out
;
sds out
= NULL
;
int output = 1;
int output = 1;
if (redisGetReply(context,&_reply) != REDIS_OK) {
if (redisGetReply(context,&_reply) != REDIS_OK) {
...
@@ -498,7 +498,8 @@ static int cliReadReply(int output_raw_strings) {
...
@@ -498,7 +498,8 @@ static int cliReadReply(int output_raw_strings) {
reply = (redisReply*)_reply;
reply = (redisReply*)_reply;
/* Check if we need to connect to a different node and reissue the request. */
/* Check if we need to connect to a different node and reissue the
* request. */
if (config.cluster_mode && reply->type == REDIS_REPLY_ERROR &&
if (config.cluster_mode && reply->type == REDIS_REPLY_ERROR &&
(!strncmp(reply->str,"MOVED",5) || !strcmp(reply->str,"ASK")))
(!strncmp(reply->str,"MOVED",5) || !strcmp(reply->str,"ASK")))
{
{
...
@@ -926,7 +927,10 @@ static void slaveMode(void) {
...
@@ -926,7 +927,10 @@ static void slaveMode(void) {
unsigned long long payload;
unsigned long long payload;
/* Send the SYNC command. */
/* Send the SYNC command. */
write
(
fd
,
"SYNC
\r\n
"
,
6
);
if (write(fd,"SYNC\r\n",6) != 6) {
fprintf(stderr,"Error writing to master\n");
exit(1);
}
/* Read $<payload>\r\n, making sure to read just up to "\n" */
/* Read $<payload>\r\n, making sure to read just up to "\n" */
p = buf;
p = buf;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment