aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-10-19 23:31:56 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-11-02 18:32:17 +0100
commit7cc6305588acea9c7960abaacf823d62f798f5ba (patch)
tree415648b8c723eba9a34fc3fc76056f798e170477 /src/event.c
parent44bc9605d6d3af9162dc917c43b7a466a24a230b (diff)
downloadcalcurse-7cc6305588acea9c7960abaacf823d62f798f5ba.tar.gz
calcurse-7cc6305588acea9c7960abaacf823d62f798f5ba.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c17
1 files changed, 8 insertions, 9 deletions
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 ();
}