diff --git a/src/draw.c b/src/draw.c index 8469ab9..3a5b95b 100644 --- a/src/draw.c +++ b/src/draw.c @@ -105,7 +105,8 @@ static color_t layout_get_sepcolor(colored_layout *cl, colored_layout *cl_next) case AUTO: return calculate_foreground_color(cl->bg); default: - LOG_E("Unknown separator color type."); + LOG_E("Invalid %s enum value in %s:%d", "sep_color", __FILE__, __LINE__); + break; } } @@ -258,7 +259,8 @@ static colored_layout *layout_init_shared(cairo_t *c, notification *n) ellipsize = PANGO_ELLIPSIZE_END; break; default: - assert(false); + LOG_E("Invalid %s enum value in %s:%d", "ellipsize", __FILE__, __LINE__); + break; } pango_layout_set_ellipsize(cl->l, ellipsize); } diff --git a/src/notification.c b/src/notification.c index 183fc63..1cea286 100644 --- a/src/notification.c +++ b/src/notification.c @@ -32,12 +32,13 @@ static void notification_dmenu_string(notification *n); const char *enum_to_string_fullscreen(enum behavior_fullscreen in) { switch (in) { - case FS_SHOW: return "show"; - case FS_DELAY: return "delay"; - case FS_PUSHBACK: return "pushback"; - case FS_NULL: return "(null)"; - default: - LOG_E("Enum behavior_fullscreen has wrong value."); + case FS_SHOW: return "show"; + case FS_DELAY: return "delay"; + case FS_PUSHBACK: return "pushback"; + case FS_NULL: return "(null)"; + default: + LOG_E("Invalid %s enum value in %s:%d", "fullscreen", __FILE__, __LINE__); + break; } }