diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-05-18 11:22:22 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-05-18 11:22:22 +0200 |
commit | 4cd2fd36d5c8c92fd9c84af52c5cb2bd7ef0e4d6 (patch) | |
tree | 881665f969fc60a6753716496a230a59200ac379 /src/day.c | |
parent | 411b8078b9afa398e10cec1892b2eb4f7d8dff23 (diff) | |
download | calcurse-4cd2fd36d5c8c92fd9c84af52c5cb2bd7ef0e4d6.zip |
Add default cases to some switch statements
This squelches several compiler warnings.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/day.c')
-rw-r--r-- | src/day.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -139,6 +139,8 @@ void day_item_erase_note(struct day_item *day) case RECUR_EVNT: erase_note(&day->item.rev->note); break; + default: + break; } } @@ -178,6 +180,8 @@ void day_item_add_exc(struct day_item *day, long date) case RECUR_APPT: recur_apoint_add_exc(day->item.rapt, date); break; + default: + break; } } @@ -646,9 +650,12 @@ struct day_item *day_cut_item(long date, int item_number) /* Paste a previously cut item. */ int day_paste_item(struct day_item *p, long date) { - switch (p->type) { - case 0: + if (!p->type) { + /* No previously cut item. */ return 0; + } + + switch (p->type) { case EVNT: event_paste_item(p->item.ev, date); break; @@ -701,6 +708,8 @@ void day_edit_note(struct day_item *p, const char *editor) case APPT: p->item.apt->note = note; break; + default: + break; } } @@ -720,5 +729,7 @@ void day_item_switch_notify(struct day_item *p) case APPT: apoint_switch_notify(p->item.apt); break; + default: + break; } } |