diff --git a/src/cluster_legacy.c b/src/cluster_legacy.c index 120d55501c..14f8a6bd1e 100644 --- a/src/cluster_legacy.c +++ b/src/cluster_legacy.c @@ -227,12 +227,8 @@ static clusterNode *clusterNodeIterNext(ClusterNodeIterator *iter) { /* Return the value associated with the node, or NULL if no more nodes */ return ln ? listNodeValue(ln) : NULL; } - /* This line is unreachable but added to avoid compiler warnings */ - default: { - serverPanic("bad type"); - return NULL; - } } + serverPanic("Unknown iterator type %d", iter->type); } static void clusterNodeIterReset(ClusterNodeIterator *iter) {