[evolution-kolab/gnome-2-30] libekolabconv: code cleanup (reduces warnings somewhat)
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/gnome-2-30] libekolabconv: code cleanup (reduces warnings somewhat)
- Date: Thu, 10 Nov 2011 17:24:02 +0000 (UTC)
commit 2783f0770809962e6e8760331d215f98446ea594
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Nov 10 18:10:27 2011 +0100
libekolabconv: code cleanup (reduces warnings somewhat)
* excplicitly ignore unused function args via
(void)foo;
* declared static functions 'static'
* removed redundant function prototypes
* added 'void' function arg to functions which don't
take args (that's c here, not c++)
src/libekolabconv/test/src/email-parser.c | 17 +++-
src/libekolabconv/test/src/main.c | 11 ++-
src/libekolabconv/test/src/test-evolution-event.c | 5 +-
src/libekolabconv/test/src/test-evolution-note.c | 2 +
src/libekolabconv/test/src/test-evolution-task.c | 2 +
src/libekolabconv/test/src/test-kolab-contact.c | 4 +
src/libekolabconv/test/src/test-kolab-event.c | 8 ++-
src/libekolabconv/test/src/test-kolab-task.c | 4 +
src/libekolabconv/test/src/test-util.c | 4 +
src/libekolabconv/test/src/test-util.h | 2 -
src/libekolabconv/test/src/testbase.c | 89 ++++++++++-----------
src/libekolabconv/test/src/testbase.h | 8 +-
12 files changed, 95 insertions(+), 61 deletions(-)
---
diff --git a/src/libekolabconv/test/src/email-parser.c b/src/libekolabconv/test/src/email-parser.c
index 42eae98..01e8e44 100644
--- a/src/libekolabconv/test/src/email-parser.c
+++ b/src/libekolabconv/test/src/email-parser.c
@@ -66,12 +66,14 @@ write_email_to_disk (GMimeMessage *message, const char *folder_name)
static void
find_email_attachments (GMimeObject *parent, GMimeObject *part, gpointer user_data)
{
+ (void)parent;
+
g_mime_objects_data *data = user_data;
//if (( parent->content_type->content type is text/plain or text/html) and (it's not an attachment))
data->g_mime_objects = g_list_append (data->g_mime_objects, (GMimeObject *) part);
}
-gchar *
+static gchar *
decode_base64_image_string (gchar *str, ssize_t len, gint *image_length)
{
gchar *image_data = g_new0(gchar, len + 1);
@@ -85,7 +87,7 @@ decode_base64_image_string (gchar *str, ssize_t len, gint *image_length)
return image_data;
}
-void
+static void
remove_extra_chars_after_xml_end_tag(gchar *xml_data, gchar *end_tag)
{
gchar *ptr_to_last_tag = strstr(xml_data, end_tag); // set pointer to first char of end tag
@@ -100,7 +102,7 @@ remove_extra_chars_after_xml_end_tag(gchar *xml_data, gchar *end_tag)
}
}
-gchar
+static gchar
*quoted_printable_to_string(gchar *str, gint *text_length)
{
gint len = strlen(str);
@@ -121,6 +123,7 @@ gchar
return text_data;
}
+#if 0
void
initialize_file_buffer(gchar *file_contents, gint size)
{
@@ -128,6 +131,7 @@ initialize_file_buffer(gchar *file_contents, gint size)
for(i=0; i<size;i++)
file_contents[i] = '\0';
}
+#endif
static gchar*
get_content_from_g_mime_object (GMimeObject *g_mime_obj, gint *image_length)
@@ -231,7 +235,7 @@ add_klb_mail_list_to_g_mime_message (GMimeMessage *message, const GList* klb_mai
//########################################PUBLIC INTERFACE########################################
-
+#if 0
void
g_mime_read_email (gchar *email_file_name)
{
@@ -321,6 +325,7 @@ g_mime_read_email (gchar *email_file_name)
fclose (fp);
}
+#endif
Kolab_conv_mail*
read_kolab_email_file(const gchar *filename, GError** error) {
@@ -336,6 +341,8 @@ read_kolab_email_file(const gchar *filename, GError** error) {
gchar contentType[50], *file_buf = NULL;
gint i = 0, file_len = 0;
+ (void)error;
+
fp = fopen (filename, "r");
/* initialize GMime */
@@ -411,6 +418,8 @@ write_kolab_email_file (const Kolab_conv_mail *mail, const gchar *filename, GErr
GMimeMessage *message = g_mime_message_new (TRUE);
+ (void)error;
+
construct_g_mime_message (message);
//Add all attachments from the mail
diff --git a/src/libekolabconv/test/src/main.c b/src/libekolabconv/test/src/main.c
index 4308395..33ac32c 100644
--- a/src/libekolabconv/test/src/main.c
+++ b/src/libekolabconv/test/src/main.c
@@ -34,7 +34,7 @@
-void
+static void
read_config_file()
{
GError *error = NULL;
@@ -61,11 +61,15 @@ read_config_file()
g_key_file_free(key_file);
}
-void
+static void
log_handler (const gchar *log_domain, GLogLevelFlags log_level,
const gchar *message, gpointer user_data)
{
gchar *level;
+
+ (void)log_domain;
+ (void)user_data;
+
switch (log_level) {
case G_LOG_LEVEL_ERROR:
level = "ERROR";
@@ -94,9 +98,10 @@ log_handler (const gchar *log_domain, GLogLevelFlags log_level,
//g_log_default_handler (log_domain, log_level,message, user_data);
}
-void
+static void
free_mem(gpointer mem_ptr, gpointer unused)
{
+ (void)unused;
g_free(mem_ptr);
}
diff --git a/src/libekolabconv/test/src/test-evolution-event.c b/src/libekolabconv/test/src/test-evolution-event.c
index 21a146c..41e1f43 100644
--- a/src/libekolabconv/test/src/test-evolution-event.c
+++ b/src/libekolabconv/test/src/test-evolution-event.c
@@ -1095,7 +1095,8 @@ validate_evolution_event_r1(const I_event *ievent, gint stage)
void
validate_evolution_event_b1(const I_event *ievent, gint stage)
{
-
+ (void)stage;
+
/* resulting alarm should look like this in kolab:
<advanced-alarms>
<alarm type="email">
@@ -1138,6 +1139,8 @@ validate_evolution_event_b1(const I_event *ievent, gint stage)
void
validate_evolution_event_b2(const I_event *ievent, gint stage)
{
+ (void)stage;
+
g_assert_cmpint(g_list_length(ievent->incidence->attendee), ==, 5);
assert_attendee_in_list(ievent->incidence->attendee, "Individual",
"h helwich tarent de", I_INC_STATUS_NONE, TRUE, FALSE, I_INC_ROLE_REQUIRED, I_INC_CUTYPE_INDIVIDUAL);
diff --git a/src/libekolabconv/test/src/test-evolution-note.c b/src/libekolabconv/test/src/test-evolution-note.c
index 6bb73d1..46e7660 100644
--- a/src/libekolabconv/test/src/test-evolution-note.c
+++ b/src/libekolabconv/test/src/test-evolution-note.c
@@ -54,6 +54,8 @@ validate_evolution_note_2(const I_note *inote, gint stage)
void
validate_evolution_note_bug_3297386(const I_note *inote, gint stage)
{
+ (void)stage;
+
assert_equal_gchar(
"BEGIN:VJOURNAL\r\nORGANIZER;CN=Hendrik Helwich:MAILTO:h helwich tarent de\r\nX-EVOLUTION-RECIPIENTS:bill gates com;donald duck de\r\nDTSTART;VALUE=DATE:20110505\r\nEND:VJOURNAL\r\n",
inote->common->evolution_store);
diff --git a/src/libekolabconv/test/src/test-evolution-task.c b/src/libekolabconv/test/src/test-evolution-task.c
index 7504513..9e61477 100644
--- a/src/libekolabconv/test/src/test-evolution-task.c
+++ b/src/libekolabconv/test/src/test-evolution-task.c
@@ -576,5 +576,7 @@ validate_evolution_task_14(const I_task *itask, gint stage)
void
validate_evolution_task_bug_3286514(const I_task *itask, gint stage)
{
+ (void)stage;
+
assert_equal_timestamp("2011-05-09 23:30:00", itask->completed_datetime);
}
diff --git a/src/libekolabconv/test/src/test-kolab-contact.c b/src/libekolabconv/test/src/test-kolab-contact.c
index 717200a..f5fcdad 100644
--- a/src/libekolabconv/test/src/test-kolab-contact.c
+++ b/src/libekolabconv/test/src/test-kolab-contact.c
@@ -347,6 +347,8 @@ validate_kolab_contact_200 (const I_contact *icontact, gint stage)
void
validate_kolab_contact_201 (const I_contact *icontact, gint stage)
{
+ (void)stage;
+
assert(g_list_length(icontact->common->kolab_attachment_store) == 2);
assert_binary_attachment_equal(
@@ -549,6 +551,8 @@ validate_kolab_contact_302 (const I_contact *icontact, gint stage)
void
validate_kolab_contact_500 (const I_contact *icontact, gint stage)
{
+ (void)stage;
+
assert_email_in_list (icontact->emails, "a1 b d", NULL);
assert_email_in_list (icontact->emails, "a2 b d", NULL);
assert_email_in_list (icontact->emails, "a3 b d", NULL);
diff --git a/src/libekolabconv/test/src/test-kolab-event.c b/src/libekolabconv/test/src/test-kolab-event.c
index bcbc5a9..2608067 100644
--- a/src/libekolabconv/test/src/test-kolab-event.c
+++ b/src/libekolabconv/test/src/test-kolab-event.c
@@ -2970,7 +2970,8 @@ validate_kolab_event_502(const I_event *ievent, gint stage)
void
validate_kolab_event_503(const I_event *ievent, gint stage)
{
-
+ (void)stage;
+
// advanced alarms
g_assert_cmpint(g_list_length(ievent->incidence->advanced_alarm), ==, 2);
@@ -3012,6 +3013,8 @@ validate_kolab_event_503(const I_event *ievent, gint stage)
void
validate_kolab_event_504(const I_event *ievent, gint stage)
{
+ (void)stage;
+
// advanced alarms
g_assert_cmpint(g_list_length(ievent->incidence->advanced_alarm), ==, 2);
@@ -3042,11 +3045,14 @@ validate_kolab_event_504(const I_event *ievent, gint stage)
NULL,
NULL,
NULL);
+ (void)mail_alarm;
}
void
validate_kolab_event_505(const I_event *ievent, gint stage)
{
+ (void)stage;
+
validate_link_attachments(ievent->incidence->common,
"file:///home/hhelwi/attach_test/penguin.png",
"file:///home/hhelwi/attach_test/bluefish.png", NULL);
diff --git a/src/libekolabconv/test/src/test-kolab-task.c b/src/libekolabconv/test/src/test-kolab-task.c
index 37fe361..ee1a8b9 100644
--- a/src/libekolabconv/test/src/test-kolab-task.c
+++ b/src/libekolabconv/test/src/test-kolab-task.c
@@ -2384,6 +2384,8 @@ validate_kolab_task_236(const I_task *itask, gint stage)
void
validate_kolab_task_502(const I_task *itask, gint stage)
{
+ (void)stage;
+
// advanced alarms
assert_Alarm_in_list(itask->incidence->advanced_alarm,
@@ -2452,6 +2454,8 @@ validate_kolab_task_503(const I_task *itask, gint stage)
void
validate_kolab_task_3286494(const I_task *itask, gint stage)
{
+ (void)stage;
+
// advanced alarms
assert_Alarm_in_list(itask->incidence->advanced_alarm,
diff --git a/src/libekolabconv/test/src/test-util.c b/src/libekolabconv/test/src/test-util.c
index 4d54892..8f1e885 100644
--- a/src/libekolabconv/test/src/test-util.c
+++ b/src/libekolabconv/test/src/test-util.c
@@ -241,6 +241,8 @@ assert_address_in_list (GList *addresses,
gchar *postal_code,
gchar *country)
{
+ (void)type;
+
g_assert (addresses != NULL);
while (addresses != NULL) {
@@ -479,6 +481,8 @@ validate_iincidence(const I_incidence *iincidence, gchar *summary, gchar *locati
gchar *organizer_display_name, gchar *organizer_smtp_address,
gchar* start_date, gint stage)
{
+ (void)stage;
+
g_assert(iincidence != NULL);
assert_equal(summary, iincidence->summary);
diff --git a/src/libekolabconv/test/src/test-util.h b/src/libekolabconv/test/src/test-util.h
index b6d734c..f030943 100644
--- a/src/libekolabconv/test/src/test-util.h
+++ b/src/libekolabconv/test/src/test-util.h
@@ -93,8 +93,6 @@ void validate_inline_attachment_names(const I_common *icommon, ...);
void strip_cr(char *s);
char *strip_cr_cpy(const char *s);
-void validate_link_attachments(const I_common *icommon, ...);
-
void assert_binary_attachment_store_equal(gchar *exp_data_file_name, gchar *name_exp, gchar *mime_type_exp,
I_common *icommon, gint idx);
diff --git a/src/libekolabconv/test/src/testbase.c b/src/libekolabconv/test/src/testbase.c
index d73d5d8..121cc1c 100644
--- a/src/libekolabconv/test/src/testbase.c
+++ b/src/libekolabconv/test/src/testbase.c
@@ -39,7 +39,6 @@
#include "main.h"
#include "testbase.h"
-
/**
* A structure which contains the needed arguments of a test
*/
@@ -55,7 +54,7 @@
* @param fmt
* a formatted message like in printf
*/
-void
+static void
check_error (GError *error, gchar *fmt, ...)
{
if (error != NULL) {
@@ -76,7 +75,7 @@ check_error (GError *error, gchar *fmt, ...)
* A filename of a kolab email file
* @return A kolab mail struct
*/
-Kolab_conv_mail*
+static Kolab_conv_mail*
read_kolab_email_file_tested (const gchar* filename, gint *stage)
{
GError *error = NULL;
@@ -88,7 +87,7 @@ read_kolab_email_file_tested (const gchar* filename, gint *stage)
return mail;
}
-void
+static void
write_kolab_email_file_tested (const gchar* filename, Kolab_conv_mail* mail, gint *stage)
{
GError *error = NULL;
@@ -99,7 +98,7 @@ write_kolab_email_file_tested (const gchar* filename, Kolab_conv_mail* mail, gin
*stage |= TEST_STAGE_KMAIL_TO_FILE;
}
-gchar*
+static gchar*
create_evolution_vcard_tested_I_contact (const EContact* econtact, gint *stage)
{
g_message("serializing evolution contact to vCard 3.0 string");
@@ -111,7 +110,7 @@ create_evolution_vcard_tested_I_contact (const EContact* econtact, gint *stage)
return vcard_str;
}
-gchar*
+static gchar*
create_evolution_vcard_tested (const ECalComponentWithTZ* epim, gint *stage)
{
g_log ("libekolabconv", G_LOG_LEVEL_MESSAGE,
@@ -137,25 +136,25 @@ create_evolution_vcard_tested (const ECalComponentWithTZ* epim, gint *stage)
}
-gchar*
+static gchar*
create_evolution_vcard_tested_I_event (const ECalComponentWithTZ* eevent, gint *stage)
{
return create_evolution_vcard_tested(eevent, stage);
}
-gchar*
+static gchar*
create_evolution_vcard_tested_I_task (const ECalComponentWithTZ* eetask, gint *stage)
{
return create_evolution_vcard_tested(eetask, stage);
}
-gchar*
+static gchar*
create_evolution_vcard_tested_I_note (const ECalComponentWithTZ* enote, gint *stage)
{
return create_evolution_vcard_tested(enote, stage);
}
-EContact*
+static EContact*
process_evolution_vcard_tested_I_contact (const gchar* vcard_str, gint *stage)
{
g_message("deserializing evolution contact from vCard 3.0 string");
@@ -164,7 +163,7 @@ process_evolution_vcard_tested_I_contact (const gchar* vcard_str, gint *stage)
return econtact;
}
-ECalComponentWithTZ*
+static ECalComponentWithTZ*
process_evolution_vcard_tested (const gchar* vcard_str, icalcomponent_kind kind, gint *stage)
{
g_message("deserializing evolution instance from vCard 3.0 string");
@@ -185,27 +184,25 @@ process_evolution_vcard_tested (const gchar* vcard_str, icalcomponent_kind kind,
return ectz;
}
-ECalComponentWithTZ*
+static ECalComponentWithTZ*
process_evolution_vcard_tested_I_event (const gchar* vcard_str, gint *stage)
{
return process_evolution_vcard_tested(vcard_str, ICAL_VEVENT_COMPONENT, stage);
}
-ECalComponentWithTZ*
+static ECalComponentWithTZ*
process_evolution_vcard_tested_I_task (const gchar* vcard_str, gint *stage)
{
return process_evolution_vcard_tested(vcard_str, ICAL_VTODO_COMPONENT, stage);
}
-ECalComponentWithTZ*
+static ECalComponentWithTZ*
process_evolution_vcard_tested_I_note (const gchar* vcard_str, gint *stage)
{
return process_evolution_vcard_tested(vcard_str, ICAL_VJOURNAL_COMPONENT, stage);
}
-
-
-gchar*
+static gchar*
read_text_file_tested (const gchar* filename)
{
GError *error = NULL;
@@ -217,14 +214,14 @@ read_text_file_tested (const gchar* filename)
return contents;
}
-void
+static void
free_after_test(gpointer ptr)
{
free_mem_after_test = g_list_append(free_mem_after_test, ptr);
}
#define process_kolab_tested(PIM_TYPE) \
-PIM_TYPE*\
+static PIM_TYPE*\
process_kolab_tested_##PIM_TYPE (const Kolab_conv_mail* kmail, void\
(*testData) (const PIM_TYPE*, gint stage), gint *stage)\
{\
@@ -246,12 +243,13 @@ process_kolab_tested(I_task)
process_kolab_tested(I_note)
#define create_kolab_tested(PIM_TYPE) \
-Kolab_conv_mail*\
+static Kolab_conv_mail*\
create_kolab_tested_##PIM_TYPE (PIM_TYPE* ipim, void\
(*testData) (const PIM_TYPE*, gint stage), gint *stage)\
{\
GError *error = NULL;\
Kolab_conv_mail *mail = NULL;\
+ (void)testData;\
\
/* convert kolab mail struct to a typed interchange struct */\
g_message("converting interchange struct to kolab mail struct");\
@@ -269,7 +267,7 @@ create_kolab_tested(I_task)
create_kolab_tested(I_note)
#define process_evolution_tested(EVO_TYPE, PIM_TYPE) \
-PIM_TYPE*\
+static PIM_TYPE*\
process_evolution_tested_##PIM_TYPE (const EVO_TYPE* epim, void\
(*testData) (const PIM_TYPE*, gint stage), gint *stage)\
{\
@@ -292,11 +290,12 @@ process_evolution_tested(ECalComponentWithTZ, I_task)
process_evolution_tested(ECalComponentWithTZ, I_note)
#define create_evolution_tested(EVO_TYPE, PIM_TYPE) \
-EVO_TYPE*\
+static EVO_TYPE*\
create_evolution_tested_##PIM_TYPE (PIM_TYPE* ipim, void\
(*testData) (const PIM_TYPE*, gint stage), gint *stage)\
{\
GError *error = NULL;\
+ (void)testData;\
/* convert to interchange struct again */\
g_message("converting interchange contact struct to an evolution contact");\
EVO_TYPE *epim = conv_##PIM_TYPE##_to_##EVO_TYPE (&ipim, &error);\
@@ -322,28 +321,28 @@ create_evolution_tested(ECalComponentWithTZ, I_event)
create_evolution_tested(ECalComponentWithTZ, I_task)
create_evolution_tested(ECalComponentWithTZ, I_note)
-void
+static void
free_I_contact(I_contact **ipim)
{
generic_g_list_free (&(*ipim)->common->kolab_attachment_store, kolabconv_free_kmail_part);
free_i_contact(ipim);
}
-void
+static void
free_I_event(I_event **ipim)
{
generic_g_list_free (&(*ipim)->incidence->common->kolab_attachment_store, kolabconv_free_kmail_part);
free_i_event(ipim);
}
-void
+static void
free_I_task(I_task **ipim)
{
generic_g_list_free (&(*ipim)->incidence->common->kolab_attachment_store, kolabconv_free_kmail_part);
free_i_task(ipim);
}
-void
+static void
free_I_note (I_note **ipim)
{
generic_g_list_free (&(*ipim)->common->kolab_attachment_store, kolabconv_free_kmail_part);
@@ -352,7 +351,7 @@ free_I_note (I_note **ipim)
#define test_convert_kolab_read_mailfile_read_kolab(PIM_TYPE) \
-void \
+static void \
test_convert_kolab_read_mailfile_read_kolab_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -372,13 +371,13 @@ test_convert_kolab_read_mailfile_read_kolab(I_event)
test_convert_kolab_read_mailfile_read_kolab(I_task)
test_convert_kolab_read_mailfile_read_kolab(I_note)
-void
+static void
free_EContact(EContact *contact)
{
kolabconv_free_econtact(contact);
}
-void
+static void
free_ECalComponentWithTZ(ECalComponentWithTZ *comp)
{
kolabconv_free_ecalendar(comp);
@@ -386,7 +385,7 @@ free_ECalComponentWithTZ(ECalComponentWithTZ *comp)
#define test_convert_evolution_read_vcard_read_evolution(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_evolution_read_vcard_read_evolution_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -408,7 +407,7 @@ test_convert_evolution_read_vcard_read_evolution(ECalComponentWithTZ, I_task)
test_convert_evolution_read_vcard_read_evolution(ECalComponentWithTZ, I_note)
#define test_convert_evolution_write_evolution(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_evolution_write_evolution_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -435,7 +434,7 @@ test_convert_evolution_write_evolution(ECalComponentWithTZ, I_task)
test_convert_evolution_write_evolution(ECalComponentWithTZ, I_note)
#define test_convert_evolution_write_vcard(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_evolution_write_vcard_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -461,7 +460,7 @@ test_convert_evolution_write_vcard(ECalComponentWithTZ, I_task)
test_convert_evolution_write_vcard(ECalComponentWithTZ, I_note)
#define test_convert_evolution_read_write_kolab(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_evolution_read_write_kolab_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -486,7 +485,7 @@ test_convert_evolution_read_write_kolab(ECalComponentWithTZ, I_task)
test_convert_evolution_read_write_kolab(ECalComponentWithTZ, I_note)
#define test_convert_evolution_read_write_mailfile(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_evolution_read_write_mailfile_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -513,7 +512,7 @@ test_convert_evolution_read_write_mailfile(ECalComponentWithTZ, I_task)
test_convert_evolution_read_write_mailfile(ECalComponentWithTZ, I_note)
#define test_convert_kolab_write_mailfile(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_kolab_write_mailfile_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -535,7 +534,7 @@ test_convert_kolab_write_mailfile(ECalComponentWithTZ, I_task)
test_convert_kolab_write_mailfile(ECalComponentWithTZ, I_note)
#define test_convert_kolab_write_kolab(PIM_TYPE) \
-void \
+static void \
test_convert_kolab_write_kolab_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -557,7 +556,7 @@ test_convert_kolab_write_kolab(I_task)
test_convert_kolab_write_kolab(I_note)
#define test_convert_kolab_read_write_evolution(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_kolab_read_write_evolution_##PIM_TYPE (const test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -579,7 +578,7 @@ test_convert_kolab_read_write_evolution(ECalComponentWithTZ, I_task)
test_convert_kolab_read_write_evolution(ECalComponentWithTZ, I_note)
#define test_convert_kolab_read_write_vcard(EVO_TYPE, PIM_TYPE) \
-void \
+static void \
test_convert_kolab_read_write_vcard_##PIM_TYPE (test_args_##PIM_TYPE *args)\
{\
kolabconv_initialize ();\
@@ -611,15 +610,15 @@ test_convert_kolab_read_write_vcard(ECalComponentWithTZ, I_note)
*
* @return The current working directory
*/
-gchar*
-get_working_dir ()
+static gchar*
+get_working_dir (void)
{
gchar *path1 = g_new0(gchar, MAXPATHLEN); // This is a buffer for the text
getcwd (path1, MAXPATHLEN);
return path1;
}
-gchar*
+static gchar*
create_test_name(gchar *format, gchar *name)
{
gchar *ret = g_strdup_printf (format, name);
@@ -639,7 +638,7 @@ create_test_name(gchar *format, gchar *name)
* the informations which are hold in the kolab contact mail
*/
#define add_tests_kolab(PIM_TYPE) \
-void \
+static void \
add_tests_kolab_##PIM_TYPE (gchar *filename, void (*validate_op) (const PIM_TYPE*, int)) \
{\
/* create the absolute filename of the contact with the given uid */\
@@ -683,7 +682,7 @@ add_tests_kolab(I_task)
add_tests_kolab(I_note)
#define add_tests_evolution(PIM_TYPE) \
-void \
+static void \
add_tests_evolution_##PIM_TYPE (gchar *filename, void (*validate_op) (const PIM_TYPE*, int))\
{\
/* create the absolute filename of the contact with the given uid */\
@@ -729,7 +728,7 @@ add_tests_evolution(I_note)
#define add_all_tests(PIM_TYPE) \
void \
-add_all_tests_##PIM_TYPE()\
+add_all_tests_##PIM_TYPE(void)\
{\
/* add kolab contact tests */\
/* get number of contact tests */\
@@ -750,5 +749,3 @@ add_all_tests(I_contact)
add_all_tests(I_event)
add_all_tests(I_task)
add_all_tests(I_note)
-
-
diff --git a/src/libekolabconv/test/src/testbase.h b/src/libekolabconv/test/src/testbase.h
index ebe2e36..a0ccab3 100644
--- a/src/libekolabconv/test/src/testbase.h
+++ b/src/libekolabconv/test/src/testbase.h
@@ -54,9 +54,9 @@ typedef enum {
TEST_STAGE_EVO_TO_FILE = 128
} TestStageEnum;
-void add_all_tests_I_contact();
-void add_all_tests_I_event();
-void add_all_tests_I_task();
-void add_all_tests_I_note();
+void add_all_tests_I_contact(void);
+void add_all_tests_I_event(void);
+void add_all_tests_I_task(void);
+void add_all_tests_I_note(void);
#endif /* TESTBASE_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]