[evolution-data-server] Bug 641838 - More compiler warning fixes
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 641838 - More compiler warning fixes
- Date: Tue, 8 Mar 2011 14:55:29 +0000 (UTC)
commit 38dceb9e2b3238b87db705d1af2d773f4c0c0f52
Author: Kjartan Maraas <kmaraas gnome org>
Date: Tue Mar 8 09:40:29 2011 -0500
Bug 641838 - More compiler warning fixes
addressbook/libedata-book/e-data-book-factory.c | 1 -
calendar/libedata-cal/e-data-cal-view.c | 6 +++---
camel/camel-data-wrapper.c | 6 +++---
camel/camel-db.c | 4 ++--
camel/camel-filter-driver.c | 4 ++--
camel/camel-folder-thread.c | 1 -
camel/camel-gpg-context.c | 2 +-
camel/camel-index-control.c | 2 --
camel/camel-mime-part-utils.c | 3 +--
camel/camel-mime-part.c | 6 +++---
camel/camel-multipart-signed.c | 4 +---
camel/camel-smime-context.c | 2 +-
camel/camel-url-scanner.c | 2 --
camel/camel-vee-folder.c | 1 -
camel/providers/imapx/camel-imapx-server.c | 6 ++----
camel/providers/imapx/camel-imapx-store.c | 1 -
camel/providers/nntp/camel-nntp-folder.c | 1 -
17 files changed, 19 insertions(+), 33 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
index 94bbbdd..b034d87 100644
--- a/addressbook/libedata-book/e-data-book-factory.c
+++ b/addressbook/libedata-book/e-data-book-factory.c
@@ -32,7 +32,6 @@
#include "e-data-book-factory.h"
#include "e-data-book.h"
#include "e-book-backend.h"
-#include "e-book-backend-factory.h"
#include "e-gdbus-egdbusbookfactory.h"
diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c
index 5aec6d1..d8b1b1a 100644
--- a/calendar/libedata-cal/e-data-cal-view.c
+++ b/calendar/libedata-cal/e-data-cal-view.c
@@ -637,7 +637,7 @@ e_data_cal_view_notify_objects_added (EDataCalView *view, const GList *objects)
void
e_data_cal_view_notify_objects_added_1 (EDataCalView *view, const gchar *object)
{
- GList l = {0,};
+ GList l = {NULL,};
g_return_if_fail (view && E_IS_DATA_CAL_VIEW (view));
g_return_if_fail (object);
@@ -685,7 +685,7 @@ e_data_cal_view_notify_objects_modified (EDataCalView *view, const GList *object
void
e_data_cal_view_notify_objects_modified_1 (EDataCalView *view, const gchar *object)
{
- GList l = {0,};
+ GList l = {NULL,};
g_return_if_fail (view && E_IS_DATA_CAL_VIEW (view));
g_return_if_fail (object);
@@ -734,7 +734,7 @@ e_data_cal_view_notify_objects_removed (EDataCalView *view, const GList *ids)
void
e_data_cal_view_notify_objects_removed_1 (EDataCalView *view, const ECalComponentId *id)
{
- GList l = {0,};
+ GList l = {NULL,};
g_return_if_fail (view && E_IS_DATA_CAL_VIEW (view));
g_return_if_fail (id);
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index 3ae5c94..8327bfd 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -903,11 +903,11 @@ camel_data_wrapper_construct_from_stream_sync (CamelDataWrapper *data_wrapper,
CamelDataWrapperClass *class;
gboolean success;
- g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), -1);
- g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
+ g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), FALSE);
+ g_return_val_if_fail (CAMEL_IS_STREAM (stream), FALSE);
class = CAMEL_DATA_WRAPPER_GET_CLASS (data_wrapper);
- g_return_val_if_fail (class->construct_from_stream_sync != NULL, -1);
+ g_return_val_if_fail (class->construct_from_stream_sync != NULL, FALSE);
success = class->construct_from_stream_sync (
data_wrapper, stream, cancellable, error);
diff --git a/camel/camel-db.c b/camel/camel-db.c
index bf27789..b9ad2bb 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -359,13 +359,13 @@ cdb_sql_exec (sqlite3 *db,
d(g_print("Camel SQL Exec:\n%s\n", stmt));
- ret = sqlite3_exec (db, stmt, 0, 0, &errmsg);
+ ret = sqlite3_exec (db, stmt, NULL, NULL, &errmsg);
while (ret == SQLITE_BUSY || ret == SQLITE_LOCKED || ret == -1) {
if (errmsg) {
sqlite3_free (errmsg);
errmsg = NULL;
}
- ret = sqlite3_exec (db, stmt, 0, 0, &errmsg);
+ ret = sqlite3_exec (db, stmt, NULL, NULL, &errmsg);
}
if (ret != SQLITE_OK) {
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 4fa8a78..eeac594 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -1271,7 +1271,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
source_url = g_filename_to_uri (mbox, NULL, NULL);
- while (camel_mime_parser_step (mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMessageInfo *info;
CamelMimeMessage *message;
CamelMimePart *mime_part;
@@ -1320,7 +1320,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
i++;
/* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
+ camel_mime_parser_step (mp, NULL, NULL);
camel_message_info_free (info);
}
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index 956fc75..8f5908b 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -44,7 +44,6 @@
#ifdef TIMEIT
#include <sys/time.h>
-#include <unistd.h>
#endif
static void
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 605b629..bbcf6e7 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -876,7 +876,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg,
if (!strncmp ((gchar *) status, "SIG_CREATED ", 12)) {
/* SIG_CREATED <type> <pubkey algo> <hash algo> <class> <timestamp> <key fpr> */
const gchar *str, *p;
- gint i;
+ gint i = 0;
str = (const gchar *) status + 12;
while (p = strchr (str, ' '), i < 2 && p) {
diff --git a/camel/camel-index-control.c b/camel/camel-index-control.c
index bc41315..fade5b8 100644
--- a/camel/camel-index-control.c
+++ b/camel/camel-index-control.c
@@ -13,7 +13,6 @@
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include "camel-list-utils.h"
@@ -142,7 +141,6 @@ gint main (gint argc, gchar **argv)
return 1;
}
-#include <sys/types.h>
#include <dirent.h>
#include "camel-stream-null.h"
#include "camel-stream-filter.h"
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 56d6bfe..9607140 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -49,8 +49,7 @@
#include "camel-stream-buffer.h"
#include "camel-utf8.h"
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))
- #include <stdio.h>*/
+#define d(x) /* (printf("%s(%d): ", __FILE__, __LINE__),(x)) */
/* simple data wrapper */
static gboolean
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 634cb6f..0924ce8 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -1411,11 +1411,11 @@ camel_mime_part_construct_from_parser_sync (CamelMimePart *mime_part,
CamelMimePartClass *class;
gboolean success;
- g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), -1);
- g_return_val_if_fail (CAMEL_IS_MIME_PARSER (parser), -1);
+ g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), FALSE);
+ g_return_val_if_fail (CAMEL_IS_MIME_PARSER (parser), FALSE);
class = CAMEL_MIME_PART_GET_CLASS (mime_part);
- g_return_val_if_fail (class->construct_from_parser_sync != NULL, -1);
+ g_return_val_if_fail (class->construct_from_parser_sync != NULL, FALSE);
success = class->construct_from_parser_sync (
mime_part, parser, cancellable, error);
diff --git a/camel/camel-multipart-signed.c b/camel/camel-multipart-signed.c
index 1375ab3..769102a 100644
--- a/camel/camel-multipart-signed.c
+++ b/camel/camel-multipart-signed.c
@@ -37,13 +37,11 @@
#include "camel-mime-message.h"
#include "camel-mime-parser.h"
#include "camel-mime-part.h"
-#include "camel-mime-part.h"
#include "camel-multipart-signed.h"
#include "camel-stream-filter.h"
#include "camel-stream-mem.h"
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))
- #include <stdio.h>;*/
+#define d(x) /* (printf("%s(%d): ", __FILE__, __LINE__),(x)) */
G_DEFINE_TYPE (CamelMultipartSigned, camel_multipart_signed, CAMEL_TYPE_MULTIPART)
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
index ada0edd..ee267b2 100644
--- a/camel/camel-smime-context.c
+++ b/camel/camel-smime-context.c
@@ -807,7 +807,7 @@ smime_context_sign_sync (CamelCipherContext *context,
(CamelSMIMEContext *)context, userid, &sechash,
((CamelSMIMEContext *)context)->priv->sign_mode == CAMEL_SMIME_SIGN_CLEARSIGN, error);
if (cmsg == NULL)
- return -1;
+ return FALSE;
ostream = camel_stream_mem_new ();
diff --git a/camel/camel-url-scanner.c b/camel/camel-url-scanner.c
index 25009c9..627d15f 100644
--- a/camel/camel-url-scanner.c
+++ b/camel/camel-url-scanner.c
@@ -464,8 +464,6 @@ camel_url_web_end (const gchar *in, const gchar *pos, const gchar *inend, urlmat
#ifdef BUILD_TABLE
-#include <stdio.h>
-
/* got these from rfc1738 */
#define CHARS_LWSP " \t\n\r" /* linear whitespace chars */
#define CHARS_SPECIAL "()<>@,;:\\\".[]"
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 15055ec..4bd1abd 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -38,7 +38,6 @@
#include "camel-vee-store.h" /* for open flags */
#include "camel-vee-summary.h"
#include "camel-string-utils.h"
-#include "camel-vee-folder.h"
#include "camel-vtrash-folder.h"
#define d(x)
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index d53a4b1..2c73fb9 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -237,10 +237,10 @@ struct _CamelIMAPXJob {
void (*start)(CamelIMAPXServer *is, struct _CamelIMAPXJob *job);
- gint noreply:1; /* dont wait for reply */
+ guint noreply:1; /* dont wait for reply */
guint32 type; /* operation type */
gint pri; /* the command priority */
- gshort commands; /* counts how many commands are outstanding */
+ gshort commands; /* counts how many commands are outstanding */
CamelFolder *folder;
@@ -4870,8 +4870,6 @@ imapx_parser_thread (gpointer d)
pollfds[1].fd = camel_operation_cancel_prfd (CAMEL_OPERATION (cancellable));
pollfds[1].in_flags = PR_POLL_READ;
-#include <prio.h>
-
res = PR_Poll (pollfds, 2, PR_MillisecondsToInterval (30 * 1000));
if (res == -1)
g_usleep (1) /* ?? */ ;
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index f67372f..d3b9c8c 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -36,7 +36,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <errno.h>
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 9934b66..9c2b3ac 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -36,7 +36,6 @@
#include "camel-nntp-folder.h"
#include "camel-nntp-private.h"
#include "camel-nntp-store.h"
-#include "camel-nntp-store.h"
#include "camel-nntp-summary.h"
G_DEFINE_TYPE (CamelNNTPFolder, camel_nntp_folder, CAMEL_TYPE_DISCO_FOLDER)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]