From 55017b90bc6927bf3a4d4056c04b242e1cc6c2ac Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 14 Jun 2021 10:58:24 +0100 Subject: Squash warning on apple darwin CI. --- src/select/unit.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/select') diff --git a/src/select/unit.c b/src/select/unit.c index 9129d72..3294db3 100644 --- a/src/select/unit.c +++ b/src/select/unit.c @@ -372,17 +372,19 @@ static inline css_hint_length css_unit__get_font_size( const css_computed_style *style, css_fixed font_size_default) { - css_hint_length size; + css_hint_length size = { + .value = font_size_default, + .unit = CSS_UNIT_PX, + }; - if (style == NULL) { - size.value = font_size_default; - size.unit = CSS_UNIT_PX; - } else { - enum css_font_size_e status = get_font_size( - style, &size.value, &size.unit); + if (style != NULL) { + enum css_font_size_e status = get_font_size(style, + &size.value, + &size.unit); UNUSED(status); + /* The font size must be absolute. */ assert(status == CSS_FONT_SIZE_DIMENSION); assert(size.unit != CSS_UNIT_EM); assert(size.unit != CSS_UNIT_EX); -- cgit v1.2.3