From: Magnus Jacobsson Date: Mon, 31 Aug 2020 17:09:51 +0000 (+0200) Subject: Remove 1 -Wswitch-default warning in agbindrec by removing redundant switch X-Git-Tag: 2.46.0~20^2^2~93^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86f23baedf47da94199db5ecec968236dca9af0c;p=graphviz Remove 1 -Wswitch-default warning in agbindrec by removing redundant switch --- diff --git a/lib/cgraph/rec.c b/lib/cgraph/rec.c index c2567f5c2..13bcbb918 100644 --- a/lib/cgraph/rec.c +++ b/lib/cgraph/rec.c @@ -96,18 +96,7 @@ void *agbindrec(void *arg_obj, char *recname, unsigned int recsize, if ((rec == NIL(Agrec_t *)) && (recsize > 0)) { rec = (Agrec_t *) agalloc(g, recsize); rec->name = agstrdup(g, recname); - switch (obj->tag.objtype) { - case AGRAPH: - objputrec(g, obj, rec); - break; - case AGNODE: - objputrec(g, obj, rec); - break; - case AGINEDGE: - case AGOUTEDGE: - objputrec(g, obj, rec); - break; - } + objputrec(g, obj, rec); } if (mtf) aggetrec(arg_obj, recname, TRUE);