]> granicus.if.org Git - graphviz/commitdiff
Remove 1 -Wswitch-default warning in agbindrec by removing redundant switch
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Mon, 31 Aug 2020 17:09:51 +0000 (19:09 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Mon, 7 Sep 2020 13:42:17 +0000 (15:42 +0200)
lib/cgraph/rec.c

index c2567f5c26f041d3bbc081f22e10eac862617864..13bcbb918d93055145188fe7018464d7c549560b 100644 (file)
@@ -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);