[dia] warnings: general cleanup



commit 962294ccbc20e6d08083253bbfae360348833a34
Author: Zander Brown <zbrown gnome org>
Date:   Fri Dec 13 15:58:10 2019 +0000

    warnings: general cleanup

 app/recent_files.c                         | 6 +++---
 app/sheet-editor/sheets_dialog.c           | 1 +
 app/sheet-editor/sheets_dialog_callbacks.c | 1 +
 lib/layer.c                                | 6 +++++-
 objects/AADL/edit_port_declaration.c       | 3 ++-
 objects/UML/class.c                        | 1 -
 6 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/app/recent_files.c b/app/recent_files.c
index c9a16f60..d8dccecc 100644
--- a/app/recent_files.c
+++ b/app/recent_files.c
@@ -45,7 +45,7 @@ static void open_recent_file_callback (GtkWidget *widget, gpointer data);
 void recent_file_history_remove (const char *fname);
 
 static void
-recent_file_history_clear_menu()
+recent_file_history_clear_menu (void)
 {
   menus_clear_recent ();
 }
@@ -54,7 +54,7 @@ recent_file_history_clear_menu()
  * Build and insert the recent files menu.
  */
 static void
-recent_file_history_make_menu()
+recent_file_history_make_menu (void)
 {
   GList *items;
   GtkActionGroup *group;
@@ -117,7 +117,7 @@ recent_file_history_add(const char *fname)
 
 /* load the recent file history */
 void
-recent_file_history_init()
+recent_file_history_init (void)
 {
   prefs.recent_documents_list_size = CLAMP(prefs.recent_documents_list_size, 0, 16);
 
diff --git a/app/sheet-editor/sheets_dialog.c b/app/sheet-editor/sheets_dialog.c
index c0552c30..08dfb1b5 100644
--- a/app/sheet-editor/sheets_dialog.c
+++ b/app/sheet-editor/sheets_dialog.c
@@ -29,6 +29,7 @@
 #endif
 #include <string.h>
 
+#undef GTK_DISABLE_DEPRECATED
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
diff --git a/app/sheet-editor/sheets_dialog_callbacks.c b/app/sheet-editor/sheets_dialog_callbacks.c
index aaa2daf0..8b6723bc 100644
--- a/app/sheet-editor/sheets_dialog_callbacks.c
+++ b/app/sheet-editor/sheets_dialog_callbacks.c
@@ -45,6 +45,7 @@
 #include <glib/gstdio.h>
 #include <gmodule.h>
 
+#undef GTK_DISABLE_DEPRECATED
 #include <gtk/gtk.h>
 
 #include <libxml/tree.h>
diff --git a/lib/layer.c b/lib/layer.c
index eaa32edb..99264ccb 100644
--- a/lib/layer.c
+++ b/lib/layer.c
@@ -994,7 +994,11 @@ dia_layer_set_object_list (DiaLayer *layer, GList *list)
 GList *
 dia_layer_get_object_list (DiaLayer *layer)
 {
-  DiaLayerPrivate *priv = dia_layer_get_instance_private (layer);
+  DiaLayerPrivate *priv;
+
+  g_return_val_if_fail (DIA_IS_LAYER (layer), NULL);
+
+  priv = dia_layer_get_instance_private (layer);
 
   return priv->objects;
 }
diff --git a/objects/AADL/edit_port_declaration.c b/objects/AADL/edit_port_declaration.c
index d9f596aa..574d88ad 100644
--- a/objects/AADL/edit_port_declaration.c
+++ b/objects/AADL/edit_port_declaration.c
@@ -84,7 +84,8 @@ static void edit_port_declaration_free (struct EditPortDeclarationChange *change
 static GtkWidget *entry;
 static gchar *text;
 
-static void save_text()
+static void
+save_text (void)
 {
   text = (gchar *) g_malloc (strlen(gtk_entry_get_text (GTK_ENTRY (entry)))+1);
   strcpy(text, gtk_entry_get_text (GTK_ENTRY (entry)));
diff --git a/objects/UML/class.c b/objects/UML/class.c
index 31bfdc8c..4bbc00f7 100644
--- a/objects/UML/class.c
+++ b/objects/UML/class.c
@@ -1933,7 +1933,6 @@ umlclass_destroy(UMLClass *umlclass)
   GList *list;
   UMLAttribute *attr;
   UMLOperation *op;
-  UMLFormalParameter *param;
 
 #ifdef DEBUG
   umlclass_sanity_check(umlclass, "Destroying");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]