]> granicus.if.org Git - graphviz/commitdiff
core plugin write_xdot: squash a -Wswitch-default warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 7 Mar 2022 03:53:25 +0000 (19:53 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Mar 2022 18:54:29 +0000 (10:54 -0800)
This switch is exhaustive.

plugin/core/gvrender_core_json.c

index 645b0c79406856637b2ab7087b4334244a7de7a2..88715a93a2c0cf5fe0ced8d37bf58df2fab858b9 100644 (file)
@@ -27,6 +27,7 @@
 #include <gvc/gvplugin_render.h>
 #include <gvc/gvplugin_device.h>
 #include <cgraph/agxbuf.h>
+#include <cgraph/unreachable.h>
 #include <common/utils.h>
 #include <gvc/gvc.h>
 #include <gvc/gvio.h>
@@ -296,6 +297,8 @@ static void write_xdot (xdot_op * op, GVJ_t * job, state_t* sp)
        indent(job, sp->Level);
        gvprintf(job, "\"fontchar\": %d\n", op->u.fontchar);
        break;
+    default:
+       UNREACHABLE();
     }
     sp->Level--;
     indent(job, sp->Level);