]> granicus.if.org Git - graphviz/commitdiff
agrename: mark switch as covering all cases
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 14 Jul 2021 02:22:22 +0000 (19:22 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 20 Jul 2021 14:19:39 +0000 (07:19 -0700)
Squashes one -Wswitch warning.

lib/cgraph/obj.c

index cf7b7d9809dcf3f3ac3c0044b7241f350c17fae1..a88736b15cda3672792794cf6a2bc00b09627d2e 100644 (file)
@@ -9,6 +9,7 @@
  *************************************************************************/
 
 #include <cgraph/cghdr.h>
+#include <cgraph/unreachable.h>
 #include <stddef.h>
 
 int agdelete(Agraph_t * g, void *obj)
@@ -63,6 +64,8 @@ int agrename(Agobj_t * obj, char *newname)
     case AGINEDGE:
     case AGOUTEDGE:
        return FAILURE;
+    default:
+       UNREACHABLE();
     }
     return SUCCESS;
 }