diff options
author | Allen Winter <allen.winter@kdab.com> | 2014-09-07 19:59:08 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2014-09-07 19:59:08 -0400 |
commit | af1ad47fad1fc91989847bab22d12c3996a040ef (patch) | |
tree | 09f4ed9452778c54a8791c4b229f8e24f3af7546 /examples | |
parent | a046f246262fcb0c7da33ec1b6958abc0fc56863 (diff) | |
download | libical-git-af1ad47fad1fc91989847bab22d12c3996a040ef.tar.gz |
Eliminate many compiler warnings from gcc
Diffstat (limited to 'examples')
-rw-r--r-- | examples/errors.c | 4 | ||||
-rw-r--r-- | examples/main.c | 1 | ||||
-rw-r--r-- | examples/parse_text.c | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/examples/errors.c b/examples/errors.c index 2ff316dd..0072f144 100644 --- a/examples/errors.c +++ b/examples/errors.c @@ -8,11 +8,9 @@ void program_errors() /*Most routines will set icalerrno on errors. This is an enumeration defined in icalerror.h */ - icalcomponent *c; - icalerror_clear_errno(); - c = icalcomponent_new(ICAL_VEVENT_COMPONENT); + (void)icalcomponent_new(ICAL_VEVENT_COMPONENT); if (icalerrno != ICAL_NO_ERROR){ diff --git a/examples/main.c b/examples/main.c index 3d8d7777..26725eaf 100644 --- a/examples/main.c +++ b/examples/main.c @@ -9,4 +9,5 @@ int main() void do_something(icalcomponent* comp){ + (void)comp;/*unused*/ } diff --git a/examples/parse_text.c b/examples/parse_text.c index 2fc9051b..75f88f2c 100644 --- a/examples/parse_text.c +++ b/examples/parse_text.c @@ -19,14 +19,12 @@ files, sockets, etc. */ char* read_stream(char *s, size_t size, void *d) { - char *c = fgets(s,size, (FILE*)d); - - return c; - + return fgets(s, (int)size, (FILE*)d); } void parse_text(int argc, char* argv[]) { + (void)argc;/*unused*/ char* line; FILE* stream; |