[evolution-patches] Warning fixes
- From: Pavel Roskin <proski gnu org>
- To: evolution-patches gnome org
- Subject: [evolution-patches] Warning fixes
- Date: Thu, 21 Sep 2006 02:04:43 -0400
Hello!
This patch fixes certain classes of warnings across the board:
- Function declared static but never defined
- No previous prototype
- Initialization makes integer from pointer without a cast
- Passing argument makes pointer from integer without a cast
Similar warnings may indicate problems on 64-bit systems. It's
important to eliminate the easy stuff to make new warnings of this kind
very visible.
--
Regards,
Pavel Roskin
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.2106
diff -u -p -r1.2106 ChangeLog
--- addressbook/ChangeLog 18 Sep 2006 17:16:25 -0000 1.2106
+++ addressbook/ChangeLog 21 Sep 2006 05:44:35 -0000
@@ -1,3 +1,8 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * gui/widgets/e-addressbook-view.c: Fix initialization of an
+ integer field with a pointer.
+
2006-09-18 Matthew Barnes <mbarnes redhat com>
Fixes bug #351332
Index: addressbook/gui/widgets/e-addressbook-view.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-addressbook-view.c,v
retrieving revision 1.187
diff -u -p -r1.187 e-addressbook-view.c
--- addressbook/gui/widgets/e-addressbook-view.c 21 Aug 2006 05:58:31 -0000 1.187
+++ addressbook/gui/widgets/e-addressbook-view.c 21 Sep 2006 05:44:35 -0000
@@ -176,15 +176,15 @@ static ESearchBarItem addressbook_search
{ N_("Name begins with"), ESB_FULL_NAME, ESB_ITEMTYPE_RADIO },
{ N_("Email begins with"), ESB_EMAIL, ESB_ITEMTYPE_RADIO },
{ N_("Any field contains"), ESB_ANY, ESB_ITEMTYPE_RADIO },
- { NULL, -1, NULL }
+ { NULL, -1, 0 }
};
static ESearchBarItem addressbook_search_items[] = {
E_FILTERBAR_ADVANCED,
- {NULL, 0, NULL},
+ {NULL, 0, 0 },
E_FILTERBAR_SAVE,
E_FILTERBAR_EDIT,
- {NULL, -1, NULL}
+ {NULL, -1, 0 }
};
GType
Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.754
diff -u -p -r1.754 ChangeLog
--- composer/ChangeLog 18 Sep 2006 17:21:36 -0000 1.754
+++ composer/ChangeLog 21 Sep 2006 05:44:35 -0000
@@ -1,3 +1,8 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * composer/e-msg-composer.c (e_msg_composer_show_attachments):
+ Comment out, it's unused and not declared in the headers.
+
2006-09-18 Matthew Barnes <mbarnes redhat com>
Fixes #351332
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.541
diff -u -p -r1.541 e-msg-composer.c
--- composer/e-msg-composer.c 18 Sep 2006 17:21:36 -0000 1.541
+++ composer/e-msg-composer.c 21 Sep 2006 05:44:36 -0000
@@ -4929,6 +4929,7 @@ e_msg_composer_new_from_url (const char
*
* If @show is %FALSE, hide the attachment bar. Otherwise, show it.
**/
+#if 0
void
e_msg_composer_show_attachments (EMsgComposer *composer,
gboolean show)
@@ -4937,6 +4938,7 @@ e_msg_composer_show_attachments (EMsgCom
show_attachments (composer, show);
}
+#endif
/**
* e_msg_composer_set_headers:
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.604
diff -u -p -r1.604 ChangeLog
--- e-util/ChangeLog 18 Sep 2006 13:05:22 -0000 1.604
+++ e-util/ChangeLog 21 Sep 2006 05:44:36 -0000
@@ -1,3 +1,10 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * e-profile-event.c (e_profile_event_emit): Provide declaration
+ if ENABLE_PROFILING is not defined to suppress gcc warning.
+ * e-util.h (get_font_options): Fix argument list.
+ * e-util.c (get_font_options): Likewise.
+
2006-09-18 Matthew Barnes <mbarnes redhat com>
** Fixes bug #352450
Index: e-util/e-profile-event.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-profile-event.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-profile-event.c
--- e-util/e-profile-event.c 8 Feb 2006 11:43:02 -0000 1.4
+++ e-util/e-profile-event.c 21 Sep 2006 05:44:36 -0000
@@ -135,6 +135,7 @@ e_profile_event_emit(const char *id, con
}
#else
#undef e_profile_event_emit
+void e_profile_event_emit(const char *id, const char *uid, guint32 flags);
void
e_profile_event_emit(const char *id, const char *uid, guint32 flags)
{
Index: e-util/e-util.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-util.c,v
retrieving revision 1.77
diff -u -p -r1.77 e-util.c
--- e-util/e-util.c 27 Aug 2006 11:55:06 -0000 1.77
+++ e-util/e-util.c 21 Sep 2006 05:44:36 -0000
@@ -1127,7 +1127,7 @@ e_gettext (const char *msgid)
}
cairo_font_options_t *
-get_font_options ()
+get_font_options (void)
{
char *antialiasing, *hinting, *subpixel_order;
GConfClient *gconf = gconf_client_get_default ();
Index: e-util/e-util.h
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-util.h,v
retrieving revision 1.63
diff -u -p -r1.63 e-util.h
--- e-util/e-util.h 24 Aug 2006 01:11:24 -0000 1.63
+++ e-util/e-util.h 21 Sep 2006 05:44:36 -0000
@@ -215,7 +215,7 @@ gchar *e_ascii_dtostr
Less than 0 for the int means copy the whole string. */
gchar *e_strdup_append_strings (gchar *first_string,
...);
-cairo_font_options_t * get_font_options ();
+cairo_font_options_t * get_font_options (void);
#ifdef __cplusplus
}
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3915
diff -u -p -r1.3915 ChangeLog
--- mail/ChangeLog 18 Sep 2006 17:24:18 -0000 1.3915
+++ mail/ChangeLog 21 Sep 2006 05:44:37 -0000
@@ -1,3 +1,10 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * mail-send-recv.c (dialog_map): Make static.
+ * message-list.c (message_list_set_threaded): Comment out,
+ it's currently unused.
+ (message_list_setup_etree): Make cast to gpointer explicit.
+
2006-09-18 Matthew Barnes <mbarnes redhat com>
Fixes #351332
Index: mail/em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.83
diff -u -p -r1.83 em-utils.c
--- mail/em-utils.c 23 Aug 2006 14:05:19 -0000 1.83
+++ mail/em-utils.c 21 Sep 2006 05:44:37 -0000
@@ -343,7 +343,7 @@ em_utils_edit_filters (GtkWidget *parent
* Picked this from e-d-s/libedataserver/e-data.
* But it allows more characters to occur in filenames, especially when saving attachment.
*/
-void
+static void
em_filename_make_safe (gchar *string)
{
gchar *p, *ts;
Index: mail/mail-send-recv.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-send-recv.c,v
retrieving revision 1.110
diff -u -p -r1.110 mail-send-recv.c
--- mail/mail-send-recv.c 21 Aug 2006 16:25:57 -0000 1.110
+++ mail/mail-send-recv.c 21 Sep 2006 05:44:37 -0000
@@ -312,7 +312,7 @@ static send_info_t get_receive_type(cons
return SEND_INVALID;
}
-gboolean
+static gboolean
dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table)
{
int h, w;
Index: mail/message-list.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/message-list.c,v
retrieving revision 1.437
diff -u -p -r1.437 message-list.c
--- mail/message-list.c 25 Aug 2006 17:48:15 -0000 1.437
+++ mail/message-list.c 21 Sep 2006 05:44:38 -0000
@@ -1718,7 +1718,7 @@ message_list_setup_etree (MessageList *m
d(printf ("folder name is '%s'\n", name));
path = mail_config_folder_to_cachename (message_list->folder, "et-expanded-");
- g_object_set_data (((GnomeCanvasItem *) item)->canvas, "freeze-cursor", 1);
+ g_object_set_data (((GnomeCanvasItem *) item)->canvas, "freeze-cursor", (gpointer) 1);
if (path && g_stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
/* build based on saved file */
@@ -3346,6 +3346,7 @@ message_list_set_threaded (MessageList *
}
}
+#if 0
void
message_list_set_expand_all (MessageList *ml, gboolean threaded)
{
@@ -3356,6 +3357,7 @@ message_list_set_expand_all (MessageList
mail_regen_list (ml, ml->search, NULL, NULL);
}
}
+#endif
void
message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted)
Index: plugins/sa-junk-plugin/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/sa-junk-plugin/ChangeLog,v
retrieving revision 1.9
diff -u -p -r1.9 ChangeLog
--- plugins/sa-junk-plugin/ChangeLog 22 Aug 2006 13:13:57 -0000 1.9
+++ plugins/sa-junk-plugin/ChangeLog 21 Sep 2006 05:44:38 -0000
@@ -1,3 +1,7 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * em-junk-filter.c (em_junk_sa_get_name): Remove, it's unused.
+
2006-08-22 Kjartan Maraas <kmaraas gnome org>
* em-junk-filter.c: (em_junk_sa_init): #if 0 out unused function and
Index: plugins/sa-junk-plugin/em-junk-filter.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/sa-junk-plugin/em-junk-filter.c,v
retrieving revision 1.9
diff -u -p -r1.9 em-junk-filter.c
--- plugins/sa-junk-plugin/em-junk-filter.c 22 Aug 2006 13:13:57 -0000 1.9
+++ plugins/sa-junk-plugin/em-junk-filter.c 21 Sep 2006 05:44:38 -0000
@@ -57,7 +57,6 @@ static pthread_mutex_t em_junk_sa_prefer
static pthread_mutex_t em_junk_sa_spamd_restart_lock = PTHREAD_MUTEX_INITIALIZER;
int e_plugin_lib_enable (EPluginLib *ep, int enable);
-static const char *em_junk_sa_get_name (void);
gboolean em_junk_sa_check_junk (EPlugin *ep, EMJunkHookTarget *target);
void em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target);
void em_junk_sa_report_non_junk (EPlugin *ep, EMJunkHookTarget *target);
@@ -94,14 +93,6 @@ static int em_junk_sa_spamd_restarts_cou
char *em_junk_sa_spamc_gconf_binary = NULL;
char *em_junk_sa_spamd_gconf_binary = NULL;
-
-#if 0
-static const char *
-em_junk_sa_get_name (void)
-{
- return _("Spamassassin (built-in)");
-}
-#endif
static int
pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err, int wait_for_termination, GByteArray *output_buffer)
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1596
diff -u -p -r1.1596 ChangeLog
--- shell/ChangeLog 18 Sep 2006 17:26:18 -0000 1.1596
+++ shell/ChangeLog 21 Sep 2006 05:44:38 -0000
@@ -1,3 +1,10 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * e-shell-window.c: Move some declarations ...
+ * e-shell-nm.h: ... to a separate header.
+ * e-shell-nm-glib.c: Include e-shell-nm.h.
+ * e-shell-nm.c: Likewise.
+
2006-09-18 Matthew Barnes <mbarnes redhat com>
** Fixes #351332
Index: shell/e-shell-nm-glib.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-nm-glib.c,v
retrieving revision 1.5
diff -u -p -r1.5 e-shell-nm-glib.c
--- shell/e-shell-nm-glib.c 27 Jul 2006 09:40:15 -0000 1.5
+++ shell/e-shell-nm-glib.c 21 Sep 2006 05:44:38 -0000
@@ -30,6 +30,8 @@
#include <NetworkManager/libnm_glib.h>
#include <e-shell-window.h>
+#include "e-shell-nm.h"
+
static libnm_glib_ctx *nm_ctx = NULL;
static guint id = 0;
Index: shell/e-shell-nm.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-nm.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-shell-nm.c
--- shell/e-shell-nm.c 27 Jul 2006 09:40:15 -0000 1.4
+++ shell/e-shell-nm.c 21 Sep 2006 05:44:38 -0000
@@ -35,6 +35,8 @@
#include <dbus/dbus-glib.h>
#include <NetworkManager/NetworkManager.h>
+#include "e-shell-nm.h"
+
typedef enum _ShellLineStatus {
E_SHELL_LINE_DOWN,
E_SHELL_LINE_UP
Index: shell/e-shell-nm.h
===================================================================
RCS file: shell/e-shell-nm.h
diff -N shell/e-shell-nm.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ shell/e-shell-nm.h 21 Sep 2006 05:44:38 -0000
@@ -0,0 +1,32 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2006 Pavel Roskin
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Author: Pavel Roskin <proski gnu org>
+ */
+
+#ifndef _E_SHELL_NM_H_
+
+#ifdef NM_SUPPORT_GLIB
+int e_shell_nm_glib_initialise (EShellWindow *window);
+void e_shell_nm_glib_dispose (EShellWindow *window);
+#elif NM_SUPPORT
+int e_shell_dbus_initialise (EShellWindow *window);
+void e_shell_dbus_dispose (EShellWindow *window);
+#endif
+
+#endif /* _E_SHELL_NM_H_ */
Index: shell/e-shell-window.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-window.c,v
retrieving revision 1.54
diff -u -p -r1.54 e-shell-window.c
--- shell/e-shell-window.c 18 Sep 2006 17:26:32 -0000 1.54
+++ shell/e-shell-window.c 21 Sep 2006 05:44:38 -0000
@@ -58,13 +58,7 @@
#include <string.h>
-#ifdef NM_SUPPORT_GLIB
-void e_shell_nm_glib_initialise (EShellWindow *window);
-void e_shell_nm_glib_dispose (EShellWindow *window);
-#elif NM_SUPPORT
-void e_shell_dbus_initialise (EShellWindow *window);
-void e_shell_dbus_dispose (EShellWindow *window);
-#endif
+#include "e-shell-nm.h"
/* A view for each component. These are all created when EShellWindow is
instantiated, but with the widget pointers to NULL and the page number set
Index: widgets/misc/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.446
diff -u -p -r1.446 ChangeLog
--- widgets/misc/ChangeLog 12 Sep 2006 11:31:32 -0000 1.446
+++ widgets/misc/ChangeLog 21 Sep 2006 05:44:38 -0000
@@ -1,3 +1,8 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * misc/e-filter-bar.c: Fix initialization of an integer field
+ with a pointer.
+
2006-09-12 Ushveen Kaur <kushveen novell com>
** Fix for bug #325614
Index: widgets/misc/e-filter-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-filter-bar.c,v
retrieving revision 1.57
diff -u -p -r1.57 e-filter-bar.c
--- widgets/misc/e-filter-bar.c 21 Aug 2006 05:57:39 -0000 1.57
+++ widgets/misc/e-filter-bar.c 21 Sep 2006 05:44:38 -0000
@@ -861,7 +861,7 @@ e_filter_bar_new (RuleContext *context,
void *data)
{
EFilterBar *bar;
- ESearchBarItem item = { NULL, -1, NULL };
+ ESearchBarItem item = { NULL, -1, 0 };
bar = gtk_type_new (e_filter_bar_get_type ());
Index: widgets/table/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/table/ChangeLog,v
retrieving revision 1.36
diff -u -p -r1.36 ChangeLog
--- widgets/table/ChangeLog 24 Aug 2006 01:07:50 -0000 1.36
+++ widgets/table/ChangeLog 21 Sep 2006 05:44:39 -0000
@@ -1,3 +1,7 @@
+2006-09-20 Pavel Roskin <proski gnu org>
+
+ * e-tree-table-adapter.c (resort_model): Make static.
+
2006-08-24 Hiroyuki Ikezoe <poincare ikezoe net>
** Fixes bug #337582
Index: widgets/table/e-tree-table-adapter.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/table/e-tree-table-adapter.c,v
retrieving revision 1.64
diff -u -p -r1.64 e-tree-table-adapter.c
--- widgets/table/e-tree-table-adapter.c 18 Aug 2006 18:50:11 -0000 1.64
+++ widgets/table/e-tree-table-adapter.c 21 Sep 2006 05:44:39 -0000
@@ -746,7 +746,8 @@ etta_proxy_no_change (ETreeModel *etm, E
e_table_model_no_change(E_TABLE_MODEL(etta));
}
-guint resort_model (ETreeTableAdapter *etta)
+static guint
+resort_model (ETreeTableAdapter *etta)
{
etta_sort_info_changed (NULL, etta);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]