SF.net SVN: geany:[5626] trunk

colombanw at users.sourceforge.net colombanw at xxxxx
Thu Mar 24 22:00:34 UTC 2011


Revision: 5626
          http://geany.svn.sourceforge.net/geany/?rev=5626&view=rev
Author:   colombanw
Date:     2011-03-24 22:00:34 +0000 (Thu, 24 Mar 2011)

Log Message:
-----------
Fix some compiler warnings

 * Shadowed function (splitwindow plugin);
 * Invalid escape sequence (classbuilder plugin);
 * Non-static local functions (classbuilder plugin);
 * Missing function argument type (keybindings.c).

Modified Paths:
--------------
    trunk/plugins/classbuilder.c
    trunk/plugins/splitwindow.c
    trunk/src/keybindings.c

Modified: trunk/plugins/classbuilder.c
===================================================================
--- trunk/plugins/classbuilder.c	2011-03-24 22:00:18 UTC (rev 5625)
+++ trunk/plugins/classbuilder.c	2011-03-24 22:00:34 UTC (rev 5626)
@@ -201,7 +201,7 @@
 {fileheader}\n\
 {namespace_decl}\n\
 {base_include}\n\
-{abstract_decl}class {class_name}{base_decl}{implements_decl}\n\{\n\
+{abstract_decl}class {class_name}{base_decl}{implements_decl}\n{\n\
 {singleton_impl}\
 {constructor_impl}\
 {destructor_impl}\n\
@@ -356,7 +356,7 @@
 }
 
 /* Creates a new option label, indented on the left */
-GtkWidget *cc_option_label_new(const gchar *text)
+static GtkWidget *cc_option_label_new(const gchar *text)
 {
 	GtkWidget *align;
 	GtkWidget *label;
@@ -373,10 +373,8 @@
 
 /* Attaches a new section label at the specified table row, optionally
  * padded at the top, and returns the new label. */
-GtkWidget *cc_table_attach_section_label(GtkWidget *table,
-										  const gchar *text,
-										  gint row,
-										  gboolean top_padding)
+static GtkWidget *cc_table_attach_section_label(GtkWidget *table, const gchar *text,
+		gint row, gboolean top_padding)
 {
 	gchar *markup;
 	GtkWidget *label, *align;
@@ -401,9 +399,7 @@
 
 /* Attach a new option label at the specified table row and returns
  * the label */
-GtkWidget *cc_table_attach_option_label(GtkWidget *table,
-										 const gchar *text,
-										 gint row)
+static GtkWidget *cc_table_attach_option_label(GtkWidget *table, const gchar *text, gint row)
 {
 	GtkWidget *opt_label = cc_option_label_new(text);
 	gtk_table_attach(GTK_TABLE(table), opt_label,
@@ -416,9 +412,7 @@
  * The label associated with the widget is set as data on the entry
  * with the "label" key, if access to it is needed later.  The entry
  * widget is returned. */
-GtkWidget *cc_table_attach_option_entry(GtkWidget *table,
-										 const gchar *text,
-										 gint row)
+static GtkWidget *cc_table_attach_option_entry(GtkWidget *table, const gchar *text, gint row)
 {
 	GtkWidget *label;
 	GtkWidget *entry;
@@ -431,7 +425,7 @@
 	return entry;
 }
 
-void show_dialog_create_class(gint type)
+static void show_dialog_create_class(gint type)
 {
 	CreateClassDialog *cc_dlg;
 	GtkWidget *main_box, *table, *label, *hdr_hbox;

Modified: trunk/plugins/splitwindow.c
===================================================================
--- trunk/plugins/splitwindow.c	2011-03-24 22:00:18 UTC (rev 5625)
+++ trunk/plugins/splitwindow.c	2011-03-24 22:00:34 UTC (rev 5626)
@@ -174,14 +174,14 @@
 static GtkWidget *ui_tool_button_new(const gchar *stock_id, const gchar *label, const gchar *tooltip)
 {
 	GtkToolItem *item;
-	gchar *dup = NULL;
+	gchar *dupl = NULL;
 
 	if (stock_id && !label)
 	{
 		label = ui_get_stock_label(stock_id);
 	}
-	dup = utils_str_remove_chars(g_strdup(label), "_");
-	label = dup;
+	dupl = utils_str_remove_chars(g_strdup(label), "_");
+	label = dupl;
 
 	item = gtk_tool_button_new(NULL, label);
 	if (stock_id)
@@ -192,7 +192,7 @@
 	if (tooltip)
 		ui_widget_set_tooltip_text(GTK_WIDGET(item), tooltip);
 
-	g_free(dup);
+	g_free(dupl);
 	return GTK_WIDGET(item);
 }
 

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2011-03-24 22:00:18 UTC (rev 5625)
+++ trunk/src/keybindings.c	2011-03-24 22:00:34 UTC (rev 5626)
@@ -1778,7 +1778,7 @@
 }
 
 
-static void update_filename_label()
+static void update_filename_label(void)
 {
 	if (!switch_dialog)
 	{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list