summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2022-10-26 17:45:42 +0200
committerAllen Winter <allen.winter@kdab.com>2022-11-13 12:31:06 -0500
commit7d701ff5ba1425895ac138be6ec0a177ec26c1ce (patch)
tree74e75f28b00fe2ea2c430672ff6ea68ed8b8793d
parentf9b2c34a551d461d065bf868e218f3df560be93f (diff)
downloadlibical-git-7d701ff5ba1425895ac138be6ec0a177ec26c1ce.tar.gz
misc: Update sources to more modern C
The code fails to build when having enabled (gcc) warnings: -Werror=implicit -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition -Werror=strict-prototypes
-rw-r--r--examples/access_components.c4
-rw-r--r--examples/access_properties_and_parameters.c2
-rw-r--r--examples/errors.c2
-rw-r--r--examples/main.c2
-rw-r--r--src/libical-glib/tools/generator.c2
-rw-r--r--src/libical-glib/tools/xml-parser.c12
-rw-r--r--src/libical-glib/tools/xml-parser.h12
-rw-r--r--src/libical/caldate.c6
-rw-r--r--src/libical/icalduration.c2
-rw-r--r--src/libical/icalerror.c4
-rw-r--r--src/libical/icalmemory.c2
-rw-r--r--src/libical/pvl.c2
-rw-r--r--src/libicalss/icalsslexer.c2
-rw-r--r--src/libicalvcal/vcc.c36
-rw-r--r--src/libicalvcal/vobject.c2
-rw-r--r--src/libicalvcal/vobject.h2
-rw-r--r--src/test/builtin_timezones.c2
-rw-r--r--src/test/icaltm_test.c5
-rw-r--r--src/test/regression-component.c6
-rw-r--r--src/test/regression-recur.c2
-rw-r--r--src/test/regression-storage.c2
-rw-r--r--src/test/regression.c106
-rw-r--r--src/test/regression.h2
-rw-r--r--src/test/timezones.c2
24 files changed, 110 insertions, 111 deletions
diff --git a/examples/access_components.c b/examples/access_components.c
index 0fbc3945..726d5cce 100644
--- a/examples/access_components.c
+++ b/examples/access_components.c
@@ -24,7 +24,7 @@ void do_something(icalcomponent *c);
*/
-icalcomponent* create_new_component()
+icalcomponent* create_new_component(void)
{
/* variable definitions */
@@ -193,7 +193,7 @@ icalcomponent* create_new_component()
/* Now, create the same component as in the previous routine, but use
the constructor style. */
-icalcomponent* create_new_component_with_va_args()
+icalcomponent* create_new_component_with_va_args(void)
{
/* This is a similar set up to the last routine */
diff --git a/examples/access_properties_and_parameters.c b/examples/access_properties_and_parameters.c
index 1f0f92f1..04df481a 100644
--- a/examples/access_properties_and_parameters.c
+++ b/examples/access_properties_and_parameters.c
@@ -99,7 +99,7 @@ void update_attendees(icalcomponent* event)
/* Here are some examples of manipulating properties */
-void test_properties()
+void test_properties(void)
{
icalproperty *prop;
icalparameter *param;
diff --git a/examples/errors.c b/examples/errors.c
index 25bccfdd..8952cb7c 100644
--- a/examples/errors.c
+++ b/examples/errors.c
@@ -2,7 +2,7 @@
#include <libical/ical.h>
-void program_errors()
+void program_errors(void)
{
/*Most routines will set icalerrno on errors. This is an
enumeration defined in icalerror.h */
diff --git a/examples/main.c b/examples/main.c
index 587dbd21..3f7c78e0 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -1,7 +1,7 @@
/* This is just to make the code in the example directory link properly. */
#include <libical/ical.h>
-int main()
+int main(void)
{
return 1;
}
diff --git a/src/libical-glib/tools/generator.c b/src/libical-glib/tools/generator.c
index 694c5fd0..f178ec9d 100644
--- a/src/libical-glib/tools/generator.c
+++ b/src/libical-glib/tools/generator.c
@@ -1921,7 +1921,7 @@ gchar *get_true_type(const gchar *type)
return res;
}
-static void initialize_default_value_table()
+static void initialize_default_value_table(void)
{
defaultValues = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
(void)g_hash_table_insert(defaultValues, g_strdup("gboolean"), g_strdup("FALSE"));
diff --git a/src/libical-glib/tools/xml-parser.c b/src/libical-glib/tools/xml-parser.c
index a9cf2704..d3fdd44c 100644
--- a/src/libical-glib/tools/xml-parser.c
+++ b/src/libical-glib/tools/xml-parser.c
@@ -15,7 +15,7 @@
#include "xml-parser.h"
-Structure *structure_new()
+Structure *structure_new(void)
{
Structure *structure;
@@ -74,7 +74,7 @@ void structure_free(Structure * structure)
g_free(structure);
}
-Declaration *declaration_new()
+Declaration *declaration_new(void)
{
Declaration *declaration = g_new0(Declaration, 1);
@@ -98,7 +98,7 @@ void declaration_free(Declaration * declaration)
g_free(declaration);
}
-Method *method_new()
+Method *method_new(void)
{
Method *method;
@@ -141,7 +141,7 @@ void method_free(Method * method)
g_free(method);
}
-Parameter *parameter_new()
+Parameter *parameter_new(void)
{
Parameter *parameter;
@@ -184,7 +184,7 @@ void parameter_free(Parameter * para)
g_free(para);
}
-Ret *ret_new()
+Ret *ret_new(void)
{
Ret *ret;
@@ -222,7 +222,7 @@ void ret_free(Ret * ret)
g_free(ret);
}
-Enumeration *enumeration_new()
+Enumeration *enumeration_new(void)
{
Enumeration *enumeration = g_new0(Enumeration, 1);
diff --git a/src/libical-glib/tools/xml-parser.h b/src/libical-glib/tools/xml-parser.h
index bccbb4d3..bffb5a17 100644
--- a/src/libical-glib/tools/xml-parser.h
+++ b/src/libical-glib/tools/xml-parser.h
@@ -83,17 +83,17 @@ typedef struct Enumeration {
gchar *comment;
} Enumeration;
-Structure *structure_new();
+Structure *structure_new(void);
void structure_free(Structure *structure);
-Method *method_new();
+Method *method_new(void);
void method_free(Method *method);
-Parameter *parameter_new();
+Parameter *parameter_new(void);
void parameter_free(Parameter *para);
-Ret *ret_new();
+Ret *ret_new(void);
void ret_free(Ret *ret);
-Enumeration *enumeration_new();
+Enumeration *enumeration_new(void);
void enumeration_free(Enumeration *enumeration);
-Declaration *declaration_new();
+Declaration *declaration_new(void);
void declaration_free(Declaration *declaration);
GList *get_list_from_string(const gchar *str);
diff --git a/src/libical/caldate.c b/src/libical/caldate.c
index e26926b4..f3d600c2 100644
--- a/src/libical/caldate.c
+++ b/src/libical/caldate.c
@@ -55,8 +55,7 @@
*
*/
-long caldat( date )
-struct ut_instant * date;
+long caldat( struct ut_instant * date )
{
double frac;
long jd;
@@ -129,8 +128,7 @@ struct ut_instant * date;
* 50 Year canon of solar eclipses: 1986-2035
*/
-double juldat( date )
-struct ut_instant * date;
+double juldat( struct ut_instant * date )
{
double frac, gyr;
long iy0, im0;
diff --git a/src/libical/icalduration.c b/src/libical/icalduration.c
index d142c0d5..3f9516da 100644
--- a/src/libical/icalduration.c
+++ b/src/libical/icalduration.c
@@ -301,7 +301,7 @@ int icaldurationtype_is_null_duration(struct icaldurationtype d)
following the philosophy of unix errno. we set the is_neg
to -1 to indicate that this is a bad duration.
*/
-struct icaldurationtype icaldurationtype_bad_duration()
+struct icaldurationtype icaldurationtype_bad_duration(void)
{
struct icaldurationtype d;
diff --git a/src/libical/icalerror.c b/src/libical/icalerror.c
index e10fd72e..e6081c2b 100644
--- a/src/libical/icalerror.c
+++ b/src/libical/icalerror.c
@@ -92,7 +92,7 @@ void icalerror_crash_here(void)
assert(*p);
}
-void icalerror_clear_errno()
+void icalerror_clear_errno(void)
{
icalerrno = ICAL_NO_ERROR;
}
@@ -108,7 +108,7 @@ void icalerror_set_errors_are_fatal(int fatal)
icalerror_errors_are_fatal = (fatal != 0);
}
-int icalerror_get_errors_are_fatal()
+int icalerror_get_errors_are_fatal(void)
{
return icalerror_errors_are_fatal;
}
diff --git a/src/libical/icalmemory.c b/src/libical/icalmemory.c
index 6c1bd9ca..db4fe4ea 100644
--- a/src/libical/icalmemory.c
+++ b/src/libical/icalmemory.c
@@ -224,7 +224,7 @@ void *icalmemory_tmp_buffer(size_t size)
return buf;
}
-void icalmemory_free_ring()
+void icalmemory_free_ring(void)
{
buffer_ring *br;
diff --git a/src/libical/pvl.c b/src/libical/pvl.c
index 960941a7..726ff835 100644
--- a/src/libical/pvl.c
+++ b/src/libical/pvl.c
@@ -76,7 +76,7 @@ typedef struct pvl_list_t
* @return Pointer to the new list, 0 if there is no available memory.
*/
-pvl_list pvl_newlist()
+pvl_list pvl_newlist(void)
{
struct pvl_list_t *L;
diff --git a/src/libicalss/icalsslexer.c b/src/libicalss/icalsslexer.c
index f889016c..ac3a2ab7 100644
--- a/src/libicalss/icalsslexer.c
+++ b/src/libicalss/icalsslexer.c
@@ -1961,7 +1961,7 @@ void ssfree (void * ptr )
-int sswrap()
+int sswrap(void)
{
return 1;
}
diff --git a/src/libicalvcal/vcc.c b/src/libicalvcal/vcc.c
index 19eb9a16..97632198 100644
--- a/src/libicalvcal/vcc.c
+++ b/src/libicalvcal/vcc.c
@@ -444,7 +444,7 @@ static int pushVObject(const char *prop)
/* This pops the recently built vCard off the stack and returns it. */
-static VObject* popVObject()
+static VObject* popVObject(void)
{
VObject *oldObj;
if (ObjStackTop < 0) {
@@ -577,7 +577,7 @@ static int lexWithinMode(enum LexMode mode) {
return 0;
}
-static char lexGetc_()
+static char lexGetc_(void)
{
/* get next char from input, no buffering. */
if (lexBuf.curPos == lexBuf.inputLen)
@@ -594,7 +594,7 @@ static char lexGetc_()
}
}
-static int lexGeta()
+static int lexGeta(void)
{
++lexBuf.len;
return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
@@ -606,7 +606,7 @@ static int lexGeta_(int i)
return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
}
-static void lexSkipLookahead() {
+static void lexSkipLookahead(void) {
if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=((char) EOF)) {
/* don't skip EOF. */
lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
@@ -614,7 +614,7 @@ static void lexSkipLookahead() {
}
}
-static int lexLookahead() {
+static int lexLookahead(void) {
int c = (lexBuf.len)?
lexBuf.buf[lexBuf.getPtr]:
lexGeta();
@@ -640,7 +640,7 @@ static int lexLookahead() {
return c;
}
-static int lexGetc() {
+static int lexGetc(void) {
int c = lexLookahead();
if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=((char) EOF)) {
/* EOF will remain in lookahead buffer */
@@ -650,14 +650,14 @@ static int lexGetc() {
return c;
}
-static void lexSkipLookaheadWord() {
+static void lexSkipLookaheadWord(void) {
if (lexBuf.strsLen <= lexBuf.len) {
lexBuf.len -= lexBuf.strsLen;
lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
}
}
-static void lexClearToken()
+static void lexClearToken(void)
{
lexBuf.strsLen = 0;
}
@@ -675,11 +675,11 @@ static void lexAppendc(int c)
}
}
-static char* lexStr() {
+static char* lexStr(void) {
return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
}
-static void lexSkipWhite() {
+static void lexSkipWhite(void) {
int c = lexLookahead();
while (c == ' ' || c == '\t') {
lexSkipLookahead();
@@ -687,7 +687,7 @@ static void lexSkipWhite() {
}
}
-static char* lexGetWord() {
+static char* lexGetWord(void) {
int c;
lexSkipWhite();
lexClearToken();
@@ -712,7 +712,7 @@ static void lexPushLookaheadc(int c) {
lexBuf.len += 1;
}
-static char* lexLookaheadWord() {
+static char* lexLookaheadWord(void) {
/* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0
/ and thing bigger than that will stop the lookahead and return 0;
/ leading white spaces are not recoverable.
@@ -778,7 +778,7 @@ static void handleMoreRFC822LineBreak(int c) {
}
}
-static char* lexGet1Value() {
+static char* lexGet1Value(void) {
int c;
lexSkipWhite();
c = lexLookahead();
@@ -849,7 +849,7 @@ void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
}
-static void finiLex() {
+static void finiLex(void) {
VObject* vobj, *topobj = 0;
while(vobj = popVObject(), vobj) {
topobj = vobj;
@@ -863,7 +863,7 @@ static void finiLex() {
/* This parses and converts the base64 format for binary encoding into
* a decoded buffer (allocated with new). See RFC 1521.
*/
-static char * lexGetDataFromBase64()
+static char * lexGetDataFromBase64(void)
{
size_t bytesLen = 0, bytesMax = 0;
int quadIx = 0, pad = 0;
@@ -985,7 +985,7 @@ static int match_begin_end_name(int end) {
return 0;
}
-static char* lexGetQuotedPrintable()
+static char* lexGetQuotedPrintable(void)
{
char cur;
@@ -1042,7 +1042,7 @@ EndString:
return lexStr();
} /* LexQuotedPrintable */
-int yylex() {
+int yylex(void) {
int lexmode = LEXMODE();
if (lexmode == L_VALUES) {
@@ -1160,7 +1160,7 @@ int yylex() {
/*** Public Functions ****/
/***************************************************************************/
-static VObject* Parse_MIMEHelper()
+static VObject* Parse_MIMEHelper(void)
{
ObjStackTop = -1;
mime_numErrors = 0;
diff --git a/src/libicalvcal/vobject.c b/src/libicalvcal/vobject.c
index 10d0cf5a..03a4249c 100644
--- a/src/libicalvcal/vobject.c
+++ b/src/libicalvcal/vobject.c
@@ -682,7 +682,7 @@ void unUseStr(const char *s)
}
}
-void cleanStrTbl()
+void cleanStrTbl(void)
{
int i;
for (i=0; i<STRTBLSIZE;i++) {
diff --git a/src/libicalvcal/vobject.h b/src/libicalvcal/vobject.h
index 7541be58..ca3317ca 100644
--- a/src/libicalvcal/vobject.h
+++ b/src/libicalvcal/vobject.h
@@ -297,7 +297,7 @@ extern "C"
LIBICAL_VCAL_EXPORT char *writeMemVObjects(char *s, int *len, VObject *list);
LIBICAL_VCAL_EXPORT const char *lookupStr(const char *s);
- LIBICAL_VCAL_EXPORT void cleanStrTbl();
+ LIBICAL_VCAL_EXPORT void cleanStrTbl(void);
LIBICAL_VCAL_EXPORT void cleanVObject(VObject *o);
LIBICAL_VCAL_EXPORT void cleanVObjects(VObject *list);
diff --git a/src/test/builtin_timezones.c b/src/test/builtin_timezones.c
index 3ceb462d..c6c22012 100644
--- a/src/test/builtin_timezones.c
+++ b/src/test/builtin_timezones.c
@@ -80,7 +80,7 @@ static void test_get_component_threadsafety(void)
}
#endif
-int main()
+int main(void)
{
icalarray *builtin_timezones;
icaltimetype tt;
diff --git a/src/test/icaltm_test.c b/src/test/icaltm_test.c
index 141d49e4..0df024a2 100644
--- a/src/test/icaltm_test.c
+++ b/src/test/icaltm_test.c
@@ -27,11 +27,12 @@
static icaltimezone *zone, *utc;
-static void *test_tread()
+static void *test_tread(void *user_data)
{
struct icaltimetype itt;
int ii;
+ _unused(user_data);
itt = icaltime_from_string("19710203T040506");
itt.zone = zone;
@@ -42,7 +43,7 @@ static void *test_tread()
return NULL;
}
-int main()
+int main(void)
{
pthread_t thread[2];
int ii;
diff --git a/src/test/regression-component.c b/src/test/regression-component.c
index 2df42abc..f3f97e25 100644
--- a/src/test/regression-component.c
+++ b/src/test/regression-component.c
@@ -83,7 +83,7 @@ static const char *create_new_component_str =
"LOCATION:1CP Conference Room 4350\r\n" "END:VEVENT\r\n" "END:VCALENDAR\r\n";
/* Create a new component */
-void create_new_component()
+void create_new_component(void)
{
icalcomponent *calendar;
icalcomponent *timezone;
@@ -213,7 +213,7 @@ void create_new_component()
/* Create a new component, using the va_args list */
-void create_new_component_with_va_args()
+void create_new_component_with_va_args(void)
{
icalcomponent *calendar;
struct icaltimetype atime = icaltime_from_timet_with_zone(time(0), 0, NULL);
@@ -308,7 +308,7 @@ static void print_span(int c, struct icaltime_span span)
/** Test icalcomponent_get_span()
*
*/
-void test_icalcomponent_get_span()
+void test_icalcomponent_get_span(void)
{
time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000,
Sat Nov 4 15:00:00 PST 2000 */
diff --git a/src/test/regression-recur.c b/src/test/regression-recur.c
index e11112e6..632c910e 100644
--- a/src/test/regression-recur.c
+++ b/src/test/regression-recur.c
@@ -75,7 +75,7 @@ static void recur_callback(icalcomponent *comp, struct icaltime_span *span, void
*num_recurs = *num_recurs + 1;
}
-void test_recur_file()
+void test_recur_file(void)
{
icalset *cin = 0;
struct icaltimetype next;
diff --git a/src/test/regression-storage.c b/src/test/regression-storage.c
index eb11f6d5..b1edc6df 100644
--- a/src/test/regression-storage.c
+++ b/src/test/regression-storage.c
@@ -283,7 +283,7 @@ void test_fileset_extended(void)
DB file), and keys for storage and retrieval.
*/
-void test_bdbset()
+void test_bdbset(void)
{
icalset *cout;
int month = 0;
diff --git a/src/test/regression.c b/src/test/regression.c
index 0d40f028..24997d8d 100644
--- a/src/test/regression.c
+++ b/src/test/regression.c
@@ -171,7 +171,7 @@ static char** get_required_attendees(icalcomponent* event)
}
*/
-void test_values()
+void test_values(void)
{
icalvalue *v;
icalvalue *copy;
@@ -280,7 +280,7 @@ void test_values()
icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR, ICAL_ERROR_DEFAULT);
}
-void test_properties()
+void test_properties(void)
{
icalproperty *prop;
icalparameter *param;
@@ -337,7 +337,7 @@ void test_properties()
icalproperty_free(prop);
}
-void test_utf8()
+void test_utf8(void)
{
icalcomponent *comp;
icalproperty *prop;
@@ -414,7 +414,7 @@ void test_utf8()
icalcomponent_free(comp);
}
-void test_icaltime_compare_utc_zone()
+void test_icaltime_compare_utc_zone(void)
{
struct icaltimetype a;
struct icaltimetype b;
@@ -431,7 +431,7 @@ void test_icaltime_compare_utc_zone()
int_is("a < b", icaltime_compare(a, b), -1);
}
-void test_parameters()
+void test_parameters(void)
{
icalparameter *p;
int i;
@@ -506,7 +506,7 @@ const char *bad_child =
"TZNAME:\\r\n"
"TZNAME:\\r\n";
-void test_components()
+void test_components(void)
{
icalcomponent *c;
icalcomponent *child;
@@ -596,7 +596,7 @@ int test_component_foreach_parameterized(int startOffsSec, int endOffsSec, int e
return 0;
}
-void test_component_foreach()
+void test_component_foreach(void)
{
const char *calStr =
"BEGIN:VCALENDAR\n"
@@ -700,7 +700,7 @@ void test_component_foreach()
}
}
-void test_recur_iterator_set_start()
+void test_recur_iterator_set_start(void)
{
icaltimetype start = icaltime_from_string("20150526");
struct icalrecurrencetype recurrence = icalrecurrencetype_from_string("FREQ=WEEKLY");
@@ -712,7 +712,7 @@ void test_recur_iterator_set_start()
icalrecur_iterator_free(iterator);
}
-void test_recur_iterator_on_jan_1()
+void test_recur_iterator_on_jan_1(void)
{
icaltimetype start = icaltime_from_string("20190101");
struct icalrecurrencetype recurrence = icalrecurrencetype_from_string("FREQ=WEEKLY;WKST=SU;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR");
@@ -726,7 +726,7 @@ void test_recur_iterator_on_jan_1()
icalrecur_iterator_free(iterator);
}
-void test_memory()
+void test_memory(void)
{
size_t bufsize = 256;
int i;
@@ -902,7 +902,7 @@ void test_memory()
}
}
-void test_dirset()
+void test_dirset(void)
{
icalcomponent *c;
icalgauge *gauge;
@@ -1022,7 +1022,7 @@ void test_dirset()
icalset_free(cluster);
}
-void test_compare()
+void test_compare(void)
{
icalvalue *v1, *v2;
@@ -1077,7 +1077,7 @@ void test_compare()
icalvalue_free(v2);
}
-void test_restriction()
+void test_restriction(void)
{
icalcomponent *comp;
struct icaltimetype atime = icaltime_from_timet_with_zone(time(0), 0, NULL);
@@ -1148,7 +1148,7 @@ void test_restriction()
ok("icalrestriction_check() == 0", (valid == 0));
}
-void test_calendar()
+void test_calendar(void)
{
icalcomponent *comp;
icalset *c;
@@ -1225,7 +1225,7 @@ void print_occur(struct icalrecurrencetype recur, struct icaltimetype start)
icalrecur_iterator_free(ritr);
}
-void test_recur()
+void test_recur(void)
{
struct icalrecurrencetype rt;
struct icaltimetype start;
@@ -1256,7 +1256,7 @@ void test_recur()
/* test_increment();*/
}
-void test_expand_recurrence()
+void test_expand_recurrence(void)
{
time_t arr[10];
time_t now = 931057385;
@@ -1289,7 +1289,7 @@ enum byrule
BY_SET_POS
};
-void icalrecurrencetype_test()
+void icalrecurrencetype_test(void)
{
icalvalue *v =
icalvalue_new_from_string(
@@ -1319,7 +1319,7 @@ void icalrecurrencetype_test()
}
/* From Federico Mena Quintero <federico@ximian.com> */
-void test_recur_parameter_bug()
+void test_recur_parameter_bug(void)
{
static const char test_icalcomp_str[] =
"BEGIN:VEVENT\r\n"
@@ -1367,7 +1367,7 @@ void test_recur_parameter_bug()
icalcomponent_free(icalcomp);
}
-void test_duration()
+void test_duration(void)
{
struct icaldurationtype d;
@@ -1450,7 +1450,7 @@ void test_duration()
str_is("P51DT5H", icaldurationtype_as_ical_string(d), "P51DT5H");
}
-void test_period()
+void test_period(void)
{
struct icalperiodtype p;
icalvalue *v;
@@ -1472,7 +1472,7 @@ void test_period()
icalvalue_free(v);
}
-void test_strings()
+void test_strings(void)
{
icalvalue *v;
@@ -1495,7 +1495,7 @@ void test_strings()
}
/* Check RFC6868 encoding of "unsafe" chars in parameter values, such as '\n' */
-void test_tzid_escape()
+void test_tzid_escape(void)
{
icalparameter *tzid;
icalproperty *prop;
@@ -1514,7 +1514,7 @@ void test_tzid_escape()
icalproperty_free(prop);
}
-void test_requeststat()
+void test_requeststat(void)
{
icalcomponent *c;
icalproperty *p;
@@ -1626,7 +1626,7 @@ void test_requeststat()
icalcomponent_free(c);
}
-void test_dtstart()
+void test_dtstart(void)
{
struct icaltimetype tt, tt2;
@@ -2011,7 +2011,7 @@ void do_test_time(const char *zone)
0);
}
-void test_iterators()
+void test_iterators(void)
{
icalcomponent *c, *inner, *next;
icalcompiter i;
@@ -2129,7 +2129,7 @@ void test_iterators()
icalcomponent_free(c);
}
-void test_time()
+void test_time(void)
{
const char *zones[6] =
{
@@ -2149,7 +2149,7 @@ void test_time()
}
}
-void test_icalset()
+void test_icalset(void)
{
icalcomponent *c;
@@ -2174,7 +2174,7 @@ void test_icalset()
icalset_free(d);
}
-void test_overlaps()
+void test_overlaps(void)
{
icalcomponent *cset, *c;
icalset *set;
@@ -2251,7 +2251,7 @@ void test_overlaps()
icalcomponent_free(c);
}
-void test_fblist()
+void test_fblist(void)
{
icalspanlist *sl, *new_sl;
icalfileset_options options = { O_RDONLY, 0644, 0, NULL };
@@ -2387,7 +2387,7 @@ void test_fblist()
icalset_free(set);
}
-void test_convenience()
+void test_convenience(void)
{
icalcomponent *c;
int duration;
@@ -2553,7 +2553,7 @@ void test_convenience()
icalcomponent_free(c);
}
-void test_time_parser()
+void test_time_parser(void)
{
struct icaltimetype tt;
@@ -2586,7 +2586,7 @@ void test_time_parser()
icalerror_set_errors_are_fatal(1);
}
-void test_recur_parser()
+void test_recur_parser(void)
{
struct icalrecurrencetype rt;
icalvalue *v = NULL;
@@ -2629,7 +2629,7 @@ char *ical_strstr(const char *haystack, const char *needle)
return strstr(haystack, needle);
}
-void test_start_of_week()
+void test_start_of_week(void)
{
struct icaltimetype tt2;
struct icaltimetype tt1 = icaltime_from_string("19900110");
@@ -2663,7 +2663,7 @@ void test_start_of_week()
} while (tt1.year < 2010);
}
-void test_doy()
+void test_doy(void)
{
struct icaltimetype tt1, tt2;
short doy, doy2;
@@ -2760,7 +2760,7 @@ void test_doy()
ok("day of year == 60", (doy == 60));
}
-void test_x()
+void test_x(void)
{
static const char test_icalcomp_str[] =
"BEGIN:VEVENT\r\n"
@@ -2807,7 +2807,7 @@ void test_x()
icalcomponent_free(icalcomp);
}
-void test_gauge_sql()
+void test_gauge_sql(void)
{
icalgauge *g;
const char *str;
@@ -2860,7 +2860,7 @@ void test_gauge_sql()
icalgauge_free(g);
}
-void test_gauge_compare()
+void test_gauge_compare(void)
{
icalgauge *g;
icalcomponent *c;
@@ -3160,7 +3160,7 @@ icalcomponent *make_component(int i)
return c;
}
-void test_fileset()
+void test_fileset(void)
{
#if defined(HAVE_UNLINK)
icalset *fs;
@@ -3243,7 +3243,7 @@ void microsleep(int us)
#endif /*Windows Sleep is useless for microsleeping */
}
-void test_file_locks()
+void test_file_locks(void)
{
#if defined(HAVE_WAITPID) && defined(HAVE_FORK) && defined(HAVE_UNLINK)
pid_t pid;
@@ -3376,7 +3376,7 @@ void test_file_locks()
#endif
}
-void test_action()
+void test_action(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3416,7 +3416,7 @@ void test_action()
icalcomponent_free(c);
}
-void test_trigger()
+void test_trigger(void)
{
struct icaltriggertype tr;
icalcomponent *c;
@@ -3539,7 +3539,7 @@ void test_trigger()
icalproperty_free(p);
}
-void test_rdate()
+void test_rdate(void)
{
struct icaldatetimeperiodtype dtp;
icalproperty *p;
@@ -3632,7 +3632,7 @@ void test_rdate()
icalproperty_free(p);
}
-void test_langbind()
+void test_langbind(void)
{
icalcomponent *c, *inner;
icalproperty *p;
@@ -3707,7 +3707,7 @@ void test_langbind()
icalcomponent_free(c);
}
-void test_property_parse()
+void test_property_parse(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3746,7 +3746,7 @@ void test_property_parse()
icalcomponent_free(c);
}
-void test_value_parameter()
+void test_value_parameter(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3778,7 +3778,7 @@ void test_value_parameter()
icalcomponent_free(c);
}
-void test_empty_parameter()
+void test_empty_parameter(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3806,7 +3806,7 @@ void test_empty_parameter()
icalcomponent_free(c);
}
-void test_x_parameter()
+void test_x_parameter(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3842,7 +3842,7 @@ void test_x_parameter()
icalcomponent_free(c);
}
-void test_x_property()
+void test_x_property(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3867,7 +3867,7 @@ void test_x_property()
icalcomponent_free(c);
}
-void test_utcoffset()
+void test_utcoffset(void)
{
icalcomponent *c;
@@ -3884,7 +3884,7 @@ void test_utcoffset()
icalcomponent_free(c);
}
-void test_attach()
+void test_attach(void)
{
icalcomponent *c;
@@ -3904,7 +3904,7 @@ void test_attach()
icalcomponent_free(c);
}
-void test_attach_caldav()
+void test_attach_caldav(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3961,7 +3961,7 @@ void test_attach_caldav()
icalcomponent_free(c);
}
-void test_attach_url()
+void test_attach_url(void)
{
static const char test_icalcomp_str_attachwithurl[] =
"BEGIN:VALARM\r\n" "ATTACH:foofile\r\n" "END:VALARM\r\n";
@@ -3990,7 +3990,7 @@ static void test_free_attach_data(char *data, void *user_data)
(*pbeen_called)++;
}
-void test_attach_data()
+void test_attach_data(void)
{
static const char test_icalcomp_str_attachwithdata[] =
"BEGIN:VALARM\r\n" "ATTACH;VALUE=BINARY:foofile\r\n" "END:VALARM\r\n";
diff --git a/src/test/regression.h b/src/test/regression.h
index 9c5aab88..88a29509 100644
--- a/src/test/regression.h
+++ b/src/test/regression.h
@@ -66,7 +66,7 @@ extern "C"
void test_header(const char *title, int test_set);
void test_start(int);
int test_end(void);
- void test_run(const char *test_name, void (*test_fcn) (), int do_test, int headeronly);
+ void test_run(const char *test_name, void (*test_fcn) (void), int do_test, int headeronly);
#ifdef __cplusplus
}
diff --git a/src/test/timezones.c b/src/test/timezones.c
index 935e912d..6beff2f9 100644
--- a/src/test/timezones.c
+++ b/src/test/timezones.c
@@ -26,7 +26,7 @@
#define MAX_FAILURE_RATE 1
-int main()
+int main(void)
{
icalarray *timezones;
icaltimezone *zone, *utc_zone;