[evolution-kolab/ek-wip-porting: 5/6] libekolabconv: fixed compiler warnings about unused params
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting: 5/6] libekolabconv: fixed compiler warnings about unused params
- Date: Wed, 30 Nov 2011 11:23:54 +0000 (UTC)
commit 657365171a6f4bc155957a113932cf13735faab8
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Nov 24 14:41:26 2011 +0100
libekolabconv: fixed compiler warnings about unused params
* cannot fix warnings about unused params by assigning NULL
to them
* put a (void)param; instead
.../main/src/evolution/contact-i-to-e.c | 10 ++++++----
src/libekolabconv/main/src/structs/common.c | 10 +++++-----
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/libekolabconv/main/src/evolution/contact-i-to-e.c b/src/libekolabconv/main/src/evolution/contact-i-to-e.c
index adb5cef..dbb4f22 100644
--- a/src/libekolabconv/main/src/evolution/contact-i-to-e.c
+++ b/src/libekolabconv/main/src/evolution/contact-i-to-e.c
@@ -63,10 +63,12 @@ conv_I_contact_to_EContact (I_contact **icontact_ptr, GError** error)
I_contact *icontact = NULL;
EContact* eContact = NULL;
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
log_debug ("\nconv_I_contact_to_EContact(): convert I_contact to EContact.");
- icontact = *icontact_ptr;
- error = NULL;
+ icontact = *icontact_ptr;
+ /* error = NULL; */ /* what's that?! */
if (icontact != NULL) {
@@ -104,7 +106,7 @@ process_contact_i_to_e (EContact* e_contact, I_contact **i_contact)
/* char paramName[20], intStr[5]; for adding hidden field for kolab_store */
gint i = 0;
gint max_evolution_im = 4; /* maximum instant messenger fields that can be handled by evolution, rest in kolab store */
-
+
/* *****************************************************************SET NAME******************************************* */
EContactName *name = g_new0(EContactName, 1);
if (icontact->given_name != NULL)
@@ -241,7 +243,7 @@ process_contact_i_to_e (EContact* e_contact, I_contact **i_contact)
}
/* TODO: handle display-name properly (kolab-store?) */
-#if 0
+#if 0
if (((Email*) list->data)->display_name)
addHiddenParamToExistingFieldInEcontact (eContact,
email_slot, "display-name",
diff --git a/src/libekolabconv/main/src/structs/common.c b/src/libekolabconv/main/src/structs/common.c
index b5d4f5f..063ccfb 100644
--- a/src/libekolabconv/main/src/structs/common.c
+++ b/src/libekolabconv/main/src/structs/common.c
@@ -71,7 +71,7 @@ void
kolab_store_add_element(I_common *i_common, gpointer parent_ptr, gchar *xml_str, gboolean reverse_order)
{
GList *list = NULL;
-
+
log_debug("add to kolab store: %d, %s", parent_ptr, xml_str);
if (i_common->kolab_store == NULL) { /* initialize kolab store */
/* g_direct_hash() : key pointers are used directly as hash value */
@@ -182,7 +182,7 @@ generic_g_slist_free(GSList **l, void (*free_func) (void **data))
* free memory used by primitive datatypes (e.g char, int...).
* reminder: memory has to be allocated by g_new(), g_new0() or function
* that internally uses them...
- *
+ *
* takes a pointer to a pointer to primitive datatype as argument
*/
void
@@ -202,8 +202,8 @@ static gboolean
free_kolab_store_elements(gpointer key, gpointer value, gpointer data)
{
/* keys will be freed somewhere else */
- key = NULL; /* to supress compiler warnings */
- data = NULL; /* to supress compiler warnings */
+ (void)key;
+ (void)data;
generic_g_list_free ((GList**) &value, free_primitive_data);
return TRUE;
@@ -302,7 +302,7 @@ print_date_or_datetime (const Date_or_datetime *dodt, const gchar *caption)
{
(void)caption;
-
+
if (dodt) {
if (dodt->date)
/* log_debug("%s", convertGDateToString( dateOrDateTime->date)); */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]