summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-08-02 18:16:23 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-08-02 18:16:23 +0000
commit10f2b7ada09d1afbec7c4d310f4c6c70aab567d6 (patch)
tree9a18fda9a3d525749a5202e7fa96c5b3d58fb184 /src/parse
parent4fb213aac1b4a925cfd42b993ea08f5d4e9546e6 (diff)
downloadlibcss-10f2b7ada09d1afbec7c4d310f4c6c70aab567d6.tar.gz
libcss-10f2b7ada09d1afbec7c4d310f4c6c70aab567d6.tar.bz2
More apparent warnings squashed
svn path=/trunk/libcss/; revision=8993
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/properties/utils.c9
1 files 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;
}
}
}