summaryrefslogtreecommitdiff
path: root/src/ui-day.c
diff options
context:
space:
mode:
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;
}
}