]> granicus.if.org Git - graphviz/commitdiff
tcldot obj2cmd: squash a spurious -Wswitch-default compiler warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 6 Sep 2021 18:12:30 +0000 (11:12 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 9 Sep 2021 03:28:06 +0000 (20:28 -0700)
tclpkg/tcldot/tcldot-util.c

index da8e34250a77c4368bdd71dfb3e09e910883e19f..503d3372aeeee250f19663e1e566909b57cf299f 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "tcldot.h"
 #include <cgraph/strcasecmp.h>
+#include <cgraph/unreachable.h>
 
 size_t Tcldot_string_writer(GVJ_t *job, const char *s, size_t len)
 {
@@ -58,6 +59,7 @@ char *obj2cmd (void *obj) {
         case AGNODE:    snprintf(buf, sizeof(buf), "node%p",  obj); break;
         case AGINEDGE: 
         case AGOUTEDGE: snprintf(buf, sizeof(buf), "edge%p",  obj); break;
+        default:        UNREACHABLE();
     }
     return buf;
 }