From 64fcd0e6ff1f7a6b85f5432767a298a95eacfe00 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 24 Jul 2015 09:39:12 +0200 Subject: [PATCH] SDS: avoid compiler warning in sdsIncrLen(). --- src/sds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sds.c b/src/sds.c index c9a6583e..d0649dcf 100644 --- a/src/sds.c +++ b/src/sds.c @@ -344,6 +344,7 @@ void sdsIncrLen(sds s, int incr) { len = (sh->len += incr); break; } + default: len = 0; /* Just to avoid compilation warnings. */ } s[len] = '\0'; }