From 10f2b7ada09d1afbec7c4d310f4c6c70aab567d6 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 2 Aug 2009 18:16:23 +0000 Subject: More apparent warnings squashed svn path=/trunk/libcss/; revision=8993 --- src/parse/properties/utils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c index c93a3fc..014de6f 100644 --- a/src/parse/properties/utils.c +++ b/src/parse/properties/utils.c @@ -431,13 +431,16 @@ css_error parse_unit_specifier(css_language *c, if (token->type == CSS_TOKEN_DIMENSION) { size_t len = lwc_string_length(token->idata); const char *data = lwc_string_data(token->idata); + css_unit temp_unit = CSS_UNIT_PX; error = parse_unit_keyword(data + consumed, len - consumed, - unit); + &temp_unit); if (error != CSS_OK) { *ctx = orig_ctx; return error; } + + *unit = (uint32_t) temp_unit; } else if (token->type == CSS_TOKEN_NUMBER) { /* Non-zero values are permitted in quirks mode */ if (num != 0) { @@ -457,7 +460,7 @@ css_error parse_unit_specifier(css_language *c, * (e.g. "0 px") */ int temp_ctx = *ctx; - uint32_t temp_unit; + css_unit temp_unit; consumeWhitespace(vector, &temp_ctx); @@ -471,7 +474,7 @@ css_error parse_unit_specifier(css_language *c, if (error == CSS_OK) { c->sheet->quirks_used = true; *ctx = temp_ctx; - *unit = temp_unit; + *unit = (uint32_t) temp_unit; } } } -- cgit v1.2.3