summaryrefslogtreecommitdiff
path: root/src/ui-day.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 11:22:22 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 11:22:22 +0200
commit4cd2fd36d5c8c92fd9c84af52c5cb2bd7ef0e4d6 (patch)
tree881665f969fc60a6753716496a230a59200ac379 /src/ui-day.c
parent411b8078b9afa398e10cec1892b2eb4f7d8dff23 (diff)
downloadcalcurse-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/ui-day.c')
-rw-r--r--src/ui-day.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ui-day.c b/src/ui-day.c
index 9401e18..8c34e77 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -393,6 +393,8 @@ void ui_day_item_edit(void)
return;
}
break;
+ default:
+ break;
}
ui_calendar_monthly_view_cache_set_invalid();
@@ -436,6 +438,8 @@ void ui_day_item_pipe(void)
case APPT:
apoint_write(p->item.apt, fpout);
break;
+ default:
+ break;
}
fclose(fpout);
@@ -767,10 +771,12 @@ void ui_day_item_repeat(void)
/* Free the current cut item, if any. */
void ui_day_item_cut_free(unsigned reg)
{
+ if (!day_cut[reg].type) {
+ /* No previously cut item, don't free anything. */
+ return;
+ }
+
switch (day_cut[reg].type) {
- case 0:
- /* No previous item, don't free anything. */
- break;
case APPT:
apoint_free(day_cut[reg].item.apt);
break;
@@ -783,6 +789,8 @@ void ui_day_item_cut_free(unsigned reg)
case RECUR_EVNT:
recur_event_free(day_cut[reg].item.rev);
break;
+ default:
+ break;
}
}