From 64928d9a670ab62ba2ed3adbad59ae151cfa3559 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 2 Jan 2005 14:42:16 +0000 Subject: [project @ 2005-01-02 14:42:16 by bursa] Fix some compiler warnings. svn path=/import/netsurf/; revision=1426 --- css/css.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/css/css.c b/css/css.c index a0d0d1d76..bade16c3a 100644 --- a/css/css.c +++ b/css/css.c @@ -72,6 +72,7 @@ * have hashed to the same value. */ +#define _GNU_SOURCE /* for strndup */ #include #include #include @@ -396,12 +397,13 @@ bool css_convert(struct content *c, int width, int height) current = source_data; end = source_data + c->source_size; while (current < end - && (token = css_tokenise(¤t, end + 10, &token_text)) != NULL) { + && (token = css_tokenise(¤t, end + 10, + &token_text))) { token_data.text = token_text; token_data.length = current - token_text; css_parser_(parser, token, token_data, ¶m); if (param.syntax_error) { - LOG(("syntax error near offset %i (%s)", + LOG(("syntax error near offset %ti (%s)", token_text - source_data, c->url)); param.syntax_error = false; @@ -1208,12 +1210,13 @@ void css_parse_property_list(struct content *c, struct css_style * style, current = source_data; end = source_data + strlen(str); while (current < end - && (token = css_tokenise(¤t, end + 10, &token_text)) != NULL) { + && (token = css_tokenise(¤t, end + 10, + &token_text))) { token_data.text = token_text; token_data.length = current - token_text; css_parser_(parser, token, token_data, ¶m); if (param.syntax_error) { - LOG(("syntax error near offset %i", + LOG(("syntax error near offset %ti", token_text - source_data)); param.syntax_error = false; } else if (param.memory_error) { @@ -1379,6 +1382,7 @@ void css_dump_style(const struct css_style * const style) if (style->border_spacing.border_spacing != css_empty_style.border_spacing.border_spacing) { fprintf(stderr, "border-spacing: "); css_dump_length(&style->border_spacing.horz); + fprintf(stderr, " "); css_dump_length(&style->border_spacing.vert); fprintf(stderr, "; "); } @@ -1565,6 +1569,7 @@ void css_dump_style(const struct css_style * const style) break; case CSS_MAX_HEIGHT_NONE: fprintf(stderr, "none"); + break; case CSS_MAX_HEIGHT_LENGTH: css_dump_length(&style->max_height.value.length); break; @@ -1584,6 +1589,7 @@ void css_dump_style(const struct css_style * const style) break; case CSS_MAX_WIDTH_NONE: fprintf(stderr, "none"); + break; case CSS_MAX_WIDTH_LENGTH: css_dump_length(&style->max_width.value.length); break; -- cgit v1.2.3