summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/errors.c4
-rw-r--r--examples/main.c1
-rw-r--r--examples/parse_text.c6
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;