]> granicus.if.org Git - graphviz/commitdiff
GTK plugin: squash -Wunused-parameter warnings in callbacks
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 5 Sep 2022 17:09:11 +0000 (10:09 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Sep 2022 19:01:11 +0000 (12:01 -0700)
These functions are used as Glade callbacks, so need to conform to particular
type signatures.

plugin/gtk/callbacks.c
plugin/gtk/gvdevice_gtk.c

index ee1073c8292e25946af75501d74696829deef4e8..6144669c1e048b0566c9969aace3f40d0fec6984 100644 (file)
@@ -23,6 +23,8 @@ void
 on_new1_activate                       (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GtkWindow *window1;
     GVJ_t *job;
 
@@ -68,6 +70,8 @@ void
 on_open1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GtkWindow *window1;
     gchar *filename;
 
@@ -106,6 +110,8 @@ void
 on_save1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GtkWindow *window1;
     gchar *filename;
 
@@ -119,6 +125,8 @@ void
 on_save_as1_activate                   (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GtkWindow *window1;
        
     window1 = GTK_WINDOW(menuitem);
@@ -130,6 +138,7 @@ void
 on_quit1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)user_data;
     gtk_widget_destroy(GTK_WIDGET(gtk_widget_get_toplevel(GTK_WIDGET(menuitem))));
     gtk_main_quit();
 }
@@ -139,6 +148,8 @@ void
 on_cut1_activate                       (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)menuitem;
+    (void)user_data;
     // I am thinking that we will annotate a node as to whether it is selected,
     // then retrieve a list of selected nodes for these operations
 }
@@ -148,7 +159,8 @@ void
 on_copy1_activate                      (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-
+  (void)menuitem;
+  (void)user_data;
 }
 
 
@@ -156,7 +168,8 @@ void
 on_paste1_activate                     (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-
+  (void)menuitem;
+  (void)user_data;
 }
 
 
@@ -164,7 +177,8 @@ void
 on_delete1_activate                    (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-
+  (void)menuitem;
+  (void)user_data;
 }
 
 
@@ -172,6 +186,8 @@ void
 on_about1_activate                     (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     static gchar *authors[] = {
                "John Ellson", 
                "Emden Gansner",
@@ -201,6 +217,9 @@ on_drawingarea1_expose_event           (GtkWidget       *widget,
                                         GdkEventExpose  *event,
                                         gpointer         user_data)
 {
+    (void)event;
+    (void)user_data;
+
     GVJ_t *job;
     cairo_t *cr;
 
@@ -238,6 +257,8 @@ on_drawingarea1_motion_notify_event    (GtkWidget       *widget,
                                         GdkEventMotion  *event,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GVJ_t *job;
 
     job = (GVJ_t *)g_object_get_data(G_OBJECT(widget),"job");
@@ -254,6 +275,9 @@ on_drawingarea2_motion_notify_event    (GtkWidget       *widget,
                                         GdkEventMotion  *event,
                                         gpointer         user_data)
 {
+  (void)widget;
+  (void)event;
+  (void)user_data;
 
   return FALSE;
 }
@@ -265,6 +289,9 @@ on_drawingarea2_expose_event           (GtkWidget       *widget,
                                         GdkEventExpose  *event,
                                         gpointer         user_data)
 {
+    (void)event;
+    (void)user_data;
+
     GVJ_t *job;
     cairo_t *cr;
     double tmp;
@@ -295,6 +322,10 @@ on_window1_delete_event                (GtkWidget       *widget,
                                         GdkEvent        *event,
                                         gpointer         user_data)
 {
+    (void)widget;
+    (void)event;
+    (void)user_data;
+
     gtk_main_quit();
     return FALSE;
 }
@@ -305,6 +336,8 @@ on_drawingarea1_configure_event        (GtkWidget       *widget,
                                         GdkEventConfigure *event,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GVJ_t *job;
     double zoom_to_fit;
 
@@ -341,6 +374,8 @@ on_drawingarea1_button_press_event     (GtkWidget       *widget,
                                         GdkEventButton  *event,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GVJ_t *job;
     pointf pointer;
 
@@ -359,6 +394,8 @@ on_drawingarea1_button_release_event   (GtkWidget       *widget,
                                         GdkEventButton  *event,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GVJ_t *job;
     pointf pointer;
 
@@ -376,6 +413,8 @@ on_drawingarea1_scroll_event           (GtkWidget       *widget,
                                         GdkEvent        *event,
                                         gpointer         user_data)
 {
+    (void)user_data;
+
     GVJ_t *job;
     pointf pointer;
 
@@ -403,6 +442,9 @@ on_button1_button_press_event          (GtkWidget       *widget,
                                         GdkEventButton  *event,
                                         gpointer         user_data)
 {
+  (void)widget;
+  (void)event;
+  (void)user_data;
 
 
 fprintf(stderr, "will delete selected object\n");
index 50209ef3b86fcef96a3be359bc2ad91ed3544d08..8612f75028cc24f188a54a4593f38cb94a078d88 100644 (file)
@@ -30,6 +30,8 @@
 static void
 attr_value_edited_cb(GtkCellRendererText *renderer, gchar *pathStr, gchar *newText, gpointer data)
 {
+       (void)renderer;
+
        GtkTreeModel *model = GTK_TREE_MODEL(data);
        GtkTreePath *path;
        GtkTreeIter iter;