From: Matthew Fernandez Date: Mon, 5 Sep 2022 17:44:40 +0000 (-0700) Subject: GTK plugin on_drawingarea1_scroll_event: squash -Wswitch-default X-Git-Tag: 6.0.1~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17ec50ad736142d9143db64bfe3b6b2099b0247d;p=graphviz GTK plugin on_drawingarea1_scroll_event: squash -Wswitch-default On GTK 2, the only valid scroll values are left, right, up, and down. GTK 3 adds a fifth, smooth, capture scrolling in a combined x/y direction (diagonal). In all cases except up and down, it seems clear this code intends to ignore the action. As of this commit, the GTK plugin builds warning-free on Linux. --- diff --git a/plugin/gtk/callbacks.c b/plugin/gtk/callbacks.c index 35208ca61..2b6e1a3f6 100644 --- a/plugin/gtk/callbacks.c +++ b/plugin/gtk/callbacks.c @@ -428,8 +428,7 @@ on_drawingarea1_scroll_event (GtkWidget *widget, case GDK_SCROLL_DOWN: job->callbacks->button_press(job, 5, pointer); break; - case GDK_SCROLL_LEFT: - case GDK_SCROLL_RIGHT: + default: // do nothing break; } gtk_widget_queue_draw(widget);