From 7cc6305588acea9c7960abaacf823d62f798f5ba Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 19 Oct 2011 23:31:56 +0200 Subject: Do not cast unused return values to void A small style fix that removes all remaining "(void)" casts. Using these isn't encouraged in GNU coding guidelines and doesn't serve a certain purpose, except for satisfying a few static code analysis tools. We already nuked some of these in previous patches, but this semantic patch should fix what's left: @@ identifier func; @@ - (void)func ( + func ( ...); Long lines were re-formatted manually. Signed-off-by: Lukas Fleischer --- src/event.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/event.c') diff --git a/src/event.c b/src/event.c index 80a1c7e..f0435e9 100644 --- a/src/event.c +++ b/src/event.c @@ -131,11 +131,11 @@ event_write (struct event *o, FILE *f) t = o->day; lt = localtime (&t); - (void)fprintf (f, "%02u/%02u/%04u [%d] ", lt->tm_mon + 1, lt->tm_mday, - 1900 + lt->tm_year, o->id); + fprintf (f, "%02u/%02u/%04u [%d] ", lt->tm_mon + 1, lt->tm_mday, + 1900 + lt->tm_year, o->id); if (o->note != NULL) - (void)fprintf (f, ">%s ", o->note); - (void)fprintf (f, "%s\n", o->mesg); + fprintf (f, ">%s ", o->note); + fprintf (f, "%s\n", o->mesg); } /* Load the events from file */ @@ -146,10 +146,10 @@ event_scan (FILE *f, struct tm start, int id, char *note) time_t tstart, t; t = time (NULL); - (void)localtime (&t); + localtime (&t); /* Read the event description */ - (void)fgets (buf, sizeof buf, f); + fgets (buf, sizeof buf, f); nl = strchr (buf, '\n'); if (nl) { @@ -212,8 +212,7 @@ event_delete_bynum (long start, unsigned num, enum eraseflg flag) void event_paste_item (void) { - (void)event_new (bkp_cut_event.mesg, bkp_cut_event.note, - date2sec (*calendar_get_slctd_day (), 0, 0), - bkp_cut_event.id); + event_new (bkp_cut_event.mesg, bkp_cut_event.note, + date2sec (*calendar_get_slctd_day (), 0, 0), bkp_cut_event.id); event_free_bkp (); } -- cgit v1.2.3-54-g00ecf