[gedit] Fix some GCC warnings
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Fix some GCC warnings
- Date: Wed, 19 Aug 2009 13:50:56 +0000 (UTC)
commit e88d76c474edaebd344dec959e0bd7bc8b3164d6
Author: Paolo Borelli <pborelli gnome org>
Date: Wed Aug 19 15:51:11 2009 +0200
Fix some GCC warnings
gedit/gedit-debug.c | 2 +-
gedit/gedit-encodings.c | 8 ++++----
gedit/gedit-gio-document-saver.c | 4 ++--
gedit/gedit-history-entry.c | 2 +-
gedit/gedit-metadata-manager.c | 4 ++--
gedit/gedit-panel.c | 9 ---------
gedit/gedit-prefs-manager-app.c | 6 +++---
gedit/gedit-prefs-manager.c | 2 +-
gedit/gedit-session.c | 4 ++--
gedit/gedit-view.c | 24 ++++++++++++------------
gedit/gedit-window.c | 2 +-
11 files changed, 29 insertions(+), 38 deletions(-)
---
diff --git a/gedit/gedit-debug.c b/gedit/gedit-debug.c
index ec5924d..163a5a5 100644
--- a/gedit/gedit-debug.c
+++ b/gedit/gedit-debug.c
@@ -47,7 +47,7 @@ static gdouble last = 0.0;
static GeditDebugSection debug = GEDIT_NO_DEBUG;
void
-gedit_debug_init ()
+gedit_debug_init (void)
{
if (g_getenv ("GEDIT_DEBUG") != NULL)
{
diff --git a/gedit/gedit-encodings.c b/gedit/gedit-encodings.c
index 0c8cba6..fec5034 100644
--- a/gedit/gedit-encodings.c
+++ b/gedit/gedit-encodings.c
@@ -337,16 +337,16 @@ gedit_encoding_get_from_charset (const gchar *charset)
}
const GeditEncoding *
-gedit_encoding_get_from_index (gint index)
+gedit_encoding_get_from_index (gint idx)
{
- g_return_val_if_fail (index >= 0, NULL);
+ g_return_val_if_fail (idx >= 0, NULL);
- if (index >= GEDIT_ENCODING_LAST)
+ if (idx >= GEDIT_ENCODING_LAST)
return NULL;
gedit_encoding_lazy_init ();
- return &encodings [index];
+ return &encodings[idx];
}
const GeditEncoding *
diff --git a/gedit/gedit-gio-document-saver.c b/gedit/gedit-gio-document-saver.c
index 9f7cde7..d57f98c 100644
--- a/gedit/gedit-gio-document-saver.c
+++ b/gedit/gedit-gio-document-saver.c
@@ -524,6 +524,7 @@ static void
begin_write (AsyncData *async)
{
GeditGioDocumentSaver *gvsaver;
+ gchar *buffer;
gsize len;
GError *error = NULL;
@@ -533,8 +534,7 @@ begin_write (AsyncData *async)
* backup as of yet
*/
gvsaver = async->saver;
- gchar *buffer = gedit_document_saver_get_document_contents (GEDIT_DOCUMENT_SAVER (gvsaver), &len, &error);
-
+ buffer = gedit_document_saver_get_document_contents (GEDIT_DOCUMENT_SAVER (gvsaver), &len, &error);
if (buffer != NULL && len > 0)
{
/* Append new line to buffer */
diff --git a/gedit/gedit-history-entry.c b/gedit/gedit-history-entry.c
index 357e30a..d2e8f85 100644
--- a/gedit/gedit-history-entry.c
+++ b/gedit/gedit-history-entry.c
@@ -386,7 +386,7 @@ gedit_history_entry_load_history (GeditHistoryEntry *entry)
GtkListStore *store;
GtkTreeIter iter;
gchar *key;
- gint i;
+ guint i;
g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (entry));
diff --git a/gedit/gedit-metadata-manager.c b/gedit/gedit-metadata-manager.c
index c0fa978..bdb00ff 100644
--- a/gedit/gedit-metadata-manager.c
+++ b/gedit/gedit-metadata-manager.c
@@ -236,7 +236,7 @@ get_metadata_filename (void)
}
static gboolean
-load_values ()
+load_values (void)
{
xmlDocPtr doc;
xmlNodePtr cur;
@@ -491,7 +491,7 @@ get_oldest (const gchar *key, const gpointer value, const gchar ** key_to_remove
}
static void
-resize_items ()
+resize_items (void)
{
while (g_hash_table_size (gedit_metadata_manager->items) > MAX_ITEMS)
{
diff --git a/gedit/gedit-panel.c b/gedit/gedit-panel.c
index 1f5ed90..1a05f10 100644
--- a/gedit/gedit-panel.c
+++ b/gedit/gedit-panel.c
@@ -79,15 +79,6 @@ enum {
static guint signals[LAST_SIGNAL];
-static void gedit_panel_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static void gedit_panel_class_init (GeditPanelClass *klass);
-
-static void gedit_panel_init (GeditPanel *panel);
-
static GObject *gedit_panel_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties);
diff --git a/gedit/gedit-prefs-manager-app.c b/gedit/gedit-prefs-manager-app.c
index 595bfbf..802cd8a 100644
--- a/gedit/gedit-prefs-manager-app.c
+++ b/gedit/gedit-prefs-manager-app.c
@@ -190,7 +190,7 @@ get_state_filename (void)
}
static GKeyFile *
-get_gedit_state_file ()
+get_gedit_state_file (void)
{
static GKeyFile *state_file = NULL;
@@ -276,7 +276,7 @@ gedit_state_set_int (const gchar *group,
}
static gboolean
-gedit_state_file_sync ()
+gedit_state_file_sync (void)
{
GKeyFile *state_file;
gchar *config_dir;
@@ -738,7 +738,7 @@ gedit_prefs_manager_app_init (void)
/* This function must be called before exiting gedit */
void
-gedit_prefs_manager_app_shutdown ()
+gedit_prefs_manager_app_shutdown (void)
{
gedit_debug (DEBUG_PREFS);
diff --git a/gedit/gedit-prefs-manager.c b/gedit/gedit-prefs-manager.c
index 64525a1..b4b68c8 100644
--- a/gedit/gedit-prefs-manager.c
+++ b/gedit/gedit-prefs-manager.c
@@ -187,7 +187,7 @@ gedit_prefs_manager_init (void)
}
void
-gedit_prefs_manager_shutdown ()
+gedit_prefs_manager_shutdown (void)
{
gedit_debug (DEBUG_PREFS);
diff --git a/gedit/gedit-session.c b/gedit/gedit-session.c
index 08b64c2..7468664 100644
--- a/gedit/gedit-session.c
+++ b/gedit/gedit-session.c
@@ -116,7 +116,7 @@ save_window_session (GKeyFile *state_file,
if (doc_array->len)
{
- int i;
+ guint i;
g_key_file_set_string_list (state_file, group_name,
"documents",
@@ -316,7 +316,7 @@ show_confirmation_dialog (GeditWindow *window)
}
static void
-ask_next_confirmation ()
+ask_next_confirmation (void)
{
g_return_if_fail (window_dirty_list != NULL);
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index de45954..8e3880e 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -114,19 +114,19 @@ static gboolean gedit_view_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time);
+ guint timestamp);
static void gedit_view_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time);
+ guint timestamp);
static gboolean gedit_view_drag_drop (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time);
+ guint timestamp);
static gboolean gedit_view_button_press_event (GtkWidget *widget,
GdkEventButton *event);
@@ -1935,19 +1935,19 @@ gedit_view_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time)
+ guint timestamp)
{
gboolean result;
/* Chain up to allow textview to scroll and position dnd mark, note
* that this needs to be checked if gtksourceview or gtktextview
* changes drag_motion behaviour */
- result = GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_motion (widget, context, x, y, time);
+ result = GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_motion (widget, context, x, y, timestamp);
/* If this is a URL, deal with it here */
if (drag_get_uri_target (widget, context) != GDK_NONE)
{
- gdk_drag_status (context, context->suggested_action, time);
+ gdk_drag_status (context, context->suggested_action, timestamp);
result = TRUE;
}
@@ -1961,7 +1961,7 @@ gedit_view_drag_data_received (GtkWidget *widget,
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time)
+ guint timestamp)
{
gchar **uri_list;
@@ -1975,12 +1975,12 @@ gedit_view_drag_data_received (GtkWidget *widget,
g_signal_emit (widget, view_signals[DROP_URIS], 0, uri_list);
g_strfreev (uri_list);
- gtk_drag_finish (context, TRUE, FALSE, time);
+ gtk_drag_finish (context, TRUE, FALSE, timestamp);
}
}
else
{
- GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_data_received (widget, context, x, y, selection_data, info, time);
+ GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_data_received (widget, context, x, y, selection_data, info, timestamp);
}
}
@@ -1989,7 +1989,7 @@ gedit_view_drag_drop (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time)
+ guint timestamp)
{
gboolean result;
GdkAtom target;
@@ -1999,13 +1999,13 @@ gedit_view_drag_drop (GtkWidget *widget,
if (target != GDK_NONE)
{
- gtk_drag_get_data (widget, context, target, time);
+ gtk_drag_get_data (widget, context, target, timestamp);
result = TRUE;
}
else
{
/* Chain up */
- result = GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_drop (widget, context, x, y, time);
+ result = GTK_WIDGET_CLASS (gedit_view_parent_class)->drag_drop (widget, context, x, y, timestamp);
}
return result;
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index f21ca14..0f53d96 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -2745,7 +2745,7 @@ drag_data_received_cb (GtkWidget *widget,
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time,
+ guint timestamp,
gpointer data)
{
GeditWindow *window;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]