summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2022-11-13 12:37:26 -0500
committerAllen Winter <allen.winter@kdab.com>2022-11-13 12:37:26 -0500
commit04b59f04981078f24a42f2c57db928c1a8e2284e (patch)
tree2211025d6a95e9104034afaa5afe5dca11554967
parent36e97ead47581fd78a99cafe3d0bed0bf90f39c1 (diff)
parentca294b8305196e5c857ed34a797e6ba47e338acc (diff)
downloadlibical-git-04b59f04981078f24a42f2c57db928c1a8e2284e.tar.gz
Merge branch '3.0'
-rw-r--r--CMakeLists.txt4
-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
-rwxr-xr-xscripts/buildtests.sh1
-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
26 files changed, 115 insertions, 111 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9994db09..09e37fc3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -581,6 +581,8 @@ endif()
if(CMAKE_C_COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments")
endif()
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_COMPILER_IS_CLANG False)
set(CMAKE_CXX_COMPILER_IS_GCC False)
@@ -612,6 +614,8 @@ endif()
if(CMAKE_CXX_COMPILER_IS_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
endif()
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
#some test programs need to know if we are using 32-bit time
if(SIZEOF_TIME_T EQUAL 4)
diff --git a/examples/access_components.c b/examples/access_components.c
index 11ae45e4..597e5e7d 100644
--- a/examples/access_components.c
+++ b/examples/access_components.c
@@ -26,7 +26,7 @@ void do_something(icalcomponent *c);
*/
-icalcomponent* create_new_component()
+icalcomponent* create_new_component(void)
{
/* variable definitions */
icalcomponent* calendar;
@@ -190,7 +190,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 */
icalcomponent* calendar;
diff --git a/examples/access_properties_and_parameters.c b/examples/access_properties_and_parameters.c
index 1e5b9b43..7716edbc 100644
--- a/examples/access_properties_and_parameters.c
+++ b/examples/access_properties_and_parameters.c
@@ -101,7 +101,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 5328cfd5..0f2ae1d0 100644
--- a/examples/errors.c
+++ b/examples/errors.c
@@ -6,7 +6,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 f2165dcf..532407a6 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -6,7 +6,7 @@
#include <libical/ical.h>
-int main()
+int main(void)
{
return 1;
}
diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh
index ab870af9..663f2f17 100755
--- a/scripts/buildtests.sh
+++ b/scripts/buildtests.sh
@@ -358,6 +358,7 @@ CPPCHECK() {
echo "===== START CPPCHECK: $1 ======"
cd $TOP
cppcheck --quiet --language=c \
+ --std=c99 \
--force --error-exitcode=1 --inline-suppr \
--enable=warning,performance,portability,information \
--template='{file}:{line},{severity},{id},{message}' \
diff --git a/src/libical-glib/tools/generator.c b/src/libical-glib/tools/generator.c
index 1e6ce406..cdd19f5d 100644
--- a/src/libical-glib/tools/generator.c
+++ b/src/libical-glib/tools/generator.c
@@ -1890,7 +1890,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 76e39b7f..0666591f 100644
--- a/src/libical-glib/tools/xml-parser.c
+++ b/src/libical-glib/tools/xml-parser.c
@@ -6,7 +6,7 @@
#include "xml-parser.h"
-Structure *structure_new()
+Structure *structure_new(void)
{
Structure *structure;
@@ -65,7 +65,7 @@ void structure_free(Structure * structure)
g_free(structure);
}
-Declaration *declaration_new()
+Declaration *declaration_new(void)
{
Declaration *declaration = g_new0(Declaration, 1);
@@ -89,7 +89,7 @@ void declaration_free(Declaration * declaration)
g_free(declaration);
}
-Method *method_new()
+Method *method_new(void)
{
Method *method;
@@ -132,7 +132,7 @@ void method_free(Method * method)
g_free(method);
}
-Parameter *parameter_new()
+Parameter *parameter_new(void)
{
Parameter *parameter;
@@ -175,7 +175,7 @@ void parameter_free(Parameter * para)
g_free(para);
}
-Ret *ret_new()
+Ret *ret_new(void)
{
Ret *ret;
@@ -213,7 +213,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 403c40c0..b8bcf78e 100644
--- a/src/libical-glib/tools/xml-parser.h
+++ b/src/libical-glib/tools/xml-parser.h
@@ -75,17 +75,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 a04bc8b1..5f7a9df4 100644
--- a/src/libical/caldate.c
+++ b/src/libical/caldate.c
@@ -71,8 +71,7 @@
*
*/
-long caldat( date )
-struct ut_instant * date;
+long caldat( struct ut_instant * date )
{
double frac;
long jd;
@@ -145,8 +144,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 e6780f59..ddcc14fc 100644
--- a/src/libical/icalduration.c
+++ b/src/libical/icalduration.c
@@ -292,7 +292,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 15445aa7..fedbea9a 100644
--- a/src/libical/icalerror.c
+++ b/src/libical/icalerror.c
@@ -86,7 +86,7 @@ void icalerror_crash_here(void)
#endif
}
-void icalerror_clear_errno()
+void icalerror_clear_errno(void)
{
icalerrno = ICAL_NO_ERROR;
}
@@ -102,7 +102,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 2b5d0490..7e10c220 100644
--- a/src/libical/icalmemory.c
+++ b/src/libical/icalmemory.c
@@ -212,7 +212,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 0695a342..a3e9f644 100644
--- a/src/libical/pvl.c
+++ b/src/libical/pvl.c
@@ -70,7 +70,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 e62e51db..a9cc8b26 100644
--- a/src/libicalss/icalsslexer.c
+++ b/src/libicalss/icalsslexer.c
@@ -1956,7 +1956,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 41daa87a..0025a663 100644
--- a/src/libicalvcal/vcc.c
+++ b/src/libicalvcal/vcc.c
@@ -550,7 +550,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) {
@@ -681,7 +681,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)
@@ -698,7 +698,7 @@ static char lexGetc_()
}
}
-static int lexGeta()
+static int lexGeta(void)
{
++lexBuf.len;
return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
@@ -710,7 +710,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;
@@ -718,7 +718,7 @@ static void lexSkipLookahead() {
}
}
-static int lexLookahead() {
+static int lexLookahead(void) {
int c = (lexBuf.len)?
lexBuf.buf[lexBuf.getPtr]:
lexGeta();
@@ -744,7 +744,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 */
@@ -754,14 +754,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;
}
@@ -779,11 +779,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();
@@ -791,7 +791,7 @@ static void lexSkipWhite() {
}
}
-static char* lexGetWord() {
+static char* lexGetWord(void) {
int c;
lexSkipWhite();
lexClearToken();
@@ -816,7 +816,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.
@@ -882,7 +882,7 @@ static void handleMoreRFC822LineBreak(int c) {
}
}
-static char* lexGet1Value() {
+static char* lexGet1Value(void) {
int c;
lexSkipWhite();
c = lexLookahead();
@@ -950,7 +950,7 @@ void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
lexBuf.strsLen = 0;
}
-static void finiLex() {
+static void finiLex(void) {
VObject* vobj, *topobj = 0;
while(vobj = popVObject(), vobj) {
topobj = vobj;
@@ -963,7 +963,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;
@@ -1085,7 +1085,7 @@ static int match_begin_end_name(int end) {
return 0;
}
-static char* lexGetQuotedPrintable()
+static char* lexGetQuotedPrintable(void)
{
char cur;
@@ -1142,7 +1142,7 @@ EndString:
return lexStr();
} /* LexQuotedPrintable */
-int yylex() {
+int yylex(void) {
int lexmode = LEXMODE();
if (lexmode == L_VALUES) {
@@ -1259,7 +1259,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 9b2484fe..db87725e 100644
--- a/src/libicalvcal/vobject.c
+++ b/src/libicalvcal/vobject.c
@@ -649,7 +649,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 72cbc58f..417f5639 100644
--- a/src/libicalvcal/vobject.h
+++ b/src/libicalvcal/vobject.h
@@ -271,7 +271,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 334b683a..9271bd33 100644
--- a/src/test/builtin_timezones.c
+++ b/src/test/builtin_timezones.c
@@ -72,7 +72,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 b3ccad34..74bea858 100644
--- a/src/test/icaltm_test.c
+++ b/src/test/icaltm_test.c
@@ -18,11 +18,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;
@@ -33,7 +34,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 0541a61b..83aba5e3 100644
--- a/src/test/regression-component.c
+++ b/src/test/regression-component.c
@@ -74,7 +74,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;
@@ -204,7 +204,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);
@@ -299,7 +299,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)
{
icaltime_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 dee65679..d354cac2 100644
--- a/src/test/regression-recur.c
+++ b/src/test/regression-recur.c
@@ -67,7 +67,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 ad63da0a..43c9170a 100644
--- a/src/test/regression-storage.c
+++ b/src/test/regression-storage.c
@@ -274,7 +274,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 fc2db8ea..8c4c5d84 100644
--- a/src/test/regression.c
+++ b/src/test/regression.c
@@ -166,7 +166,7 @@ static char** get_required_attendees(icalcomponent* event)
}
*/
-void test_values()
+void test_values(void)
{
icalvalue *v;
icalvalue *copy;
@@ -275,7 +275,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;
@@ -332,7 +332,7 @@ void test_properties()
icalproperty_free(prop);
}
-void test_utf8()
+void test_utf8(void)
{
icalcomponent *comp;
icalproperty *prop;
@@ -409,7 +409,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;
@@ -426,7 +426,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;
@@ -501,7 +501,7 @@ const char *bad_child =
"TZNAME:\\r\n"
"TZNAME:\\r\n";
-void test_components()
+void test_components(void)
{
icalcomponent *c;
icalcomponent *child;
@@ -591,7 +591,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"
@@ -695,7 +695,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");
@@ -707,7 +707,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");
@@ -721,7 +721,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;
@@ -897,7 +897,7 @@ void test_memory()
}
}
-void test_dirset()
+void test_dirset(void)
{
icalcomponent *c;
icalgauge *gauge;
@@ -1017,7 +1017,7 @@ void test_dirset()
icalset_free(cluster);
}
-void test_compare()
+void test_compare(void)
{
icalvalue *v1, *v2;
@@ -1072,7 +1072,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);
@@ -1151,7 +1151,7 @@ void test_restriction()
ok("icalrestriction_check() == 0", (valid == 0));
}
-void test_calendar()
+void test_calendar(void)
{
icalcomponent *comp;
icalset *c;
@@ -1228,7 +1228,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;
@@ -1343,7 +1343,7 @@ void test_recur_encode_by_month()
}
}
-void test_expand_recurrence()
+void test_expand_recurrence(void)
{
icaltime_t arr[10];
icaltime_t now = 931057385;
@@ -1376,7 +1376,7 @@ enum byrule
BY_SET_POS
};
-void icalrecurrencetype_test()
+void icalrecurrencetype_test(void)
{
icalvalue *v =
icalvalue_new_from_string(
@@ -1406,7 +1406,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"
@@ -1454,7 +1454,7 @@ void test_recur_parameter_bug()
icalcomponent_free(icalcomp);
}
-void test_duration()
+void test_duration(void)
{
struct icaldurationtype d;
@@ -1537,7 +1537,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;
@@ -1559,7 +1559,7 @@ void test_period()
icalvalue_free(v);
}
-void test_strings()
+void test_strings(void)
{
icalvalue *v;
@@ -1582,7 +1582,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;
@@ -1601,7 +1601,7 @@ void test_tzid_escape()
icalproperty_free(prop);
}
-void test_requeststat()
+void test_requeststat(void)
{
icalcomponent *c;
icalproperty *p;
@@ -1713,7 +1713,7 @@ void test_requeststat()
icalcomponent_free(c);
}
-void test_dtstart()
+void test_dtstart(void)
{
struct icaltimetype tt, tt2;
@@ -2098,7 +2098,7 @@ void do_test_time(const char *zone)
0);
}
-void test_iterators()
+void test_iterators(void)
{
icalcomponent *c, *inner, *next;
icalcompiter i;
@@ -2216,7 +2216,7 @@ void test_iterators()
icalcomponent_free(c);
}
-void test_time()
+void test_time(void)
{
const char *zones[6] =
{
@@ -2236,7 +2236,7 @@ void test_time()
}
}
-void test_icalset()
+void test_icalset(void)
{
icalcomponent *c;
@@ -2261,7 +2261,7 @@ void test_icalset()
icalset_free(d);
}
-void test_overlaps()
+void test_overlaps(void)
{
icalcomponent *cset, *c;
icalset *set;
@@ -2338,7 +2338,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 };
@@ -2474,7 +2474,7 @@ void test_fblist()
icalset_free(set);
}
-void test_convenience()
+void test_convenience(void)
{
icalcomponent *c;
int duration;
@@ -2640,7 +2640,7 @@ void test_convenience()
icalcomponent_free(c);
}
-void test_time_parser()
+void test_time_parser(void)
{
struct icaltimetype tt;
@@ -2673,7 +2673,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;
@@ -2807,7 +2807,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");
@@ -2841,7 +2841,7 @@ void test_start_of_week()
} while (tt1.year < 2010);
}
-void test_doy()
+void test_doy(void)
{
struct icaltimetype tt1, tt2;
short doy, doy2;
@@ -2938,7 +2938,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"
@@ -2985,7 +2985,7 @@ void test_x()
icalcomponent_free(icalcomp);
}
-void test_gauge_sql()
+void test_gauge_sql(void)
{
icalgauge *g;
const char *str;
@@ -3038,7 +3038,7 @@ void test_gauge_sql()
icalgauge_free(g);
}
-void test_gauge_compare()
+void test_gauge_compare(void)
{
icalgauge *g;
icalcomponent *c;
@@ -3338,7 +3338,7 @@ icalcomponent *make_component(int i)
return c;
}
-void test_fileset()
+void test_fileset(void)
{
#if defined(HAVE_UNLINK)
icalset *fs;
@@ -3421,7 +3421,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;
@@ -3554,7 +3554,7 @@ void test_file_locks()
#endif
}
-void test_action()
+void test_action(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3594,7 +3594,7 @@ void test_action()
icalcomponent_free(c);
}
-void test_trigger()
+void test_trigger(void)
{
struct icaltriggertype tr;
icalcomponent *c;
@@ -3717,7 +3717,7 @@ void test_trigger()
icalproperty_free(p);
}
-void test_rdate()
+void test_rdate(void)
{
struct icaldatetimeperiodtype dtp;
icalproperty *p;
@@ -3810,7 +3810,7 @@ void test_rdate()
icalproperty_free(p);
}
-void test_langbind()
+void test_langbind(void)
{
icalcomponent *c, *inner;
icalproperty *p;
@@ -3885,7 +3885,7 @@ void test_langbind()
icalcomponent_free(c);
}
-void test_property_parse()
+void test_property_parse(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3924,7 +3924,7 @@ void test_property_parse()
icalcomponent_free(c);
}
-void test_value_parameter()
+void test_value_parameter(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3956,7 +3956,7 @@ void test_value_parameter()
icalcomponent_free(c);
}
-void test_empty_parameter()
+void test_empty_parameter(void)
{
icalcomponent *c;
icalproperty *p;
@@ -3984,7 +3984,7 @@ void test_empty_parameter()
icalcomponent_free(c);
}
-void test_x_parameter()
+void test_x_parameter(void)
{
icalcomponent *c;
icalproperty *p;
@@ -4020,7 +4020,7 @@ void test_x_parameter()
icalcomponent_free(c);
}
-void test_x_property()
+void test_x_property(void)
{
icalcomponent *c;
icalproperty *p;
@@ -4045,7 +4045,7 @@ void test_x_property()
icalcomponent_free(c);
}
-void test_utcoffset()
+void test_utcoffset(void)
{
icalcomponent *c;
@@ -4062,7 +4062,7 @@ void test_utcoffset()
icalcomponent_free(c);
}
-void test_attach()
+void test_attach(void)
{
icalcomponent *c;
@@ -4082,7 +4082,7 @@ void test_attach()
icalcomponent_free(c);
}
-void test_attach_caldav()
+void test_attach_caldav(void)
{
icalcomponent *c;
icalproperty *p;
@@ -4139,7 +4139,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";
@@ -4168,7 +4168,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 55531793..12107c18 100644
--- a/src/test/regression.h
+++ b/src/test/regression.h
@@ -58,7 +58,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 0285e3b5..caed836d 100644
--- a/src/test/timezones.c
+++ b/src/test/timezones.c
@@ -17,7 +17,7 @@
#define MAX_FAILURE_RATE 1
-int main()
+int main(void)
{
icalarray *timezones;
icaltimezone *zone, *utc_zone;