]> granicus.if.org Git - graphviz/commitdiff
GDK plugin gdk_format: squash -Wswitch-default warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 3 Apr 2022 19:52:32 +0000 (12:52 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Apr 2022 01:03:37 +0000 (18:03 -0700)
The device ID can only be one of the values configured at the bottom of this
file, so this switch is exhaustive.

plugin/gdk/gvdevice_gdk.c

index 0d04761ccadbbabd218ca03d324696fde9b07f19..15ebb0568e4db044cf089daa4b80942d574bd312 100644 (file)
@@ -9,7 +9,7 @@
  *************************************************************************/
 
 #include "config.h"
-
+#include <cgraph/unreachable.h>
 #include <gvc/gvplugin_device.h>
 #include <gvc/gvio.h>
 #ifdef HAVE_PANGOCAIRO
@@ -81,6 +81,8 @@ static void gdk_format(GVJ_t * job)
     case FORMAT_TIFF:
        format_str = "tiff";
        break;
+    default:
+       UNREACHABLE();
     }
 
     argb2rgba(job->width, job->height, job->imagedata);