diff options
author | Milan Crha <mcrha@redhat.com> | 2022-10-26 17:45:42 +0200 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2022-11-13 12:31:06 -0500 |
commit | 7d701ff5ba1425895ac138be6ec0a177ec26c1ce (patch) | |
tree | 74e75f28b00fe2ea2c430672ff6ea68ed8b8793d /examples | |
parent | f9b2c34a551d461d065bf868e218f3df560be93f (diff) | |
download | libical-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
Diffstat (limited to 'examples')
-rw-r--r-- | examples/access_components.c | 4 | ||||
-rw-r--r-- | examples/access_properties_and_parameters.c | 2 | ||||
-rw-r--r-- | examples/errors.c | 2 | ||||
-rw-r--r-- | examples/main.c | 2 |
4 files changed, 5 insertions, 5 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; } |