From: antirez Date: Wed, 11 Nov 2009 18:59:54 +0000 (+0100) Subject: Removed a long time warning compiling with recent GCC on Linux X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/fee803ba3eeb9a902e3e8ac27812cc9b2eba970b?hp=a81885d9ea995d8dcf0940e544a2480f2afbd3f1 Removed a long time warning compiling with recent GCC on Linux --- diff --git a/TODO b/TODO index 95034ea2..4699db78 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,7 @@ VERSION 1.1 TODO * Man pages for MSET MSETNX and SRANDMEMBER, Z-commands, ... * ZSETs missing stuff: ZINCRBY * Use strcoll() to compare objects in sorted sets, like it already happens for SORT. -* EXPIRE, EXPIREAT, ZSCORE tests. +* LPOPPUSH, EXPIRE, EXPIREAT, ZSCORE, SRANDMEMBER tests. * Write docs for the "STORE" operaiton of SORT, and GET "#" option. * Append only mode: testing and a command to rebuild the log from scratch. * Profiling and optimizations. For instance the commands lookup is probably starting to eat too CPU being a simple list. To implement binary search or an hash table lookup can be a win probably. diff --git a/redis.c b/redis.c index e6da5f85..90063525 100644 --- a/redis.c +++ b/redis.c @@ -1893,7 +1893,9 @@ static void acceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { char *err = "-ERR max number of clients reached\r\n"; /* That's a best effort error message, don't check write errors */ - (void) write(c->fd,err,strlen(err)); + if (write(c->fd,err,strlen(err)) == -1) { + /* Nothing to do, Just to avoid the warning... */ + } freeClient(c); return; }