diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-07-26 21:20:11 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-07-26 21:20:11 +0000 |
commit | da47188a8369bb79884d37f3222c8bf8fabb7ea4 (patch) | |
tree | 55ee6e2d99ac2b1751c13a9a03cd402b7c7d5710 /src | |
parent | c13945dd277f68ee913df42bf83c9cd2ba9f4014 (diff) | |
download | libcss-da47188a8369bb79884d37f3222c8bf8fabb7ea4.tar.gz libcss-da47188a8369bb79884d37f3222c8bf8fabb7ea4.tar.bz2 |
Fix build with GCC 4.6
svn path=/trunk/libcss/; revision=12627
Diffstat (limited to 'src')
-rw-r--r-- | src/lex/lex.c | 4 | ||||
-rw-r--r-- | src/parse/properties/font.c | 9 | ||||
-rw-r--r-- | src/select/properties/Makefile | 2 | ||||
-rw-r--r-- | src/select/properties/azimuth.c | 3 | ||||
-rw-r--r-- | src/select/properties/elevation.c | 3 | ||||
-rw-r--r-- | src/select/properties/page_break_inside.c | 3 | ||||
-rw-r--r-- | src/select/properties/pitch.c | 3 | ||||
-rw-r--r-- | src/select/properties/play_during.c | 3 | ||||
-rw-r--r-- | src/select/properties/speak.c | 3 | ||||
-rw-r--r-- | src/select/properties/speak_header.c | 3 | ||||
-rw-r--r-- | src/select/properties/speak_numeral.c | 3 | ||||
-rw-r--r-- | src/select/properties/speak_punctuation.c | 3 | ||||
-rw-r--r-- | src/select/properties/speech_rate.c (renamed from src/select/properties/speach_rate.c) | 3 | ||||
-rw-r--r-- | src/select/properties/volume.c | 5 |
14 files changed, 5 insertions, 45 deletions
diff --git a/src/lex/lex.c b/src/lex/lex.c index 7b258bd..aba86c5 100644 --- a/src/lex/lex.c +++ b/src/lex/lex.c @@ -378,7 +378,11 @@ css_error emitToken(css_lexer *lexer, css_token_type type, error = parserutils_inputstream_peek(lexer->input, 0, &data, &clen); +#ifndef NDEBUG assert(type == CSS_TOKEN_EOF || error == PARSERUTILS_OK); +#else + (void) error; +#endif t->data.data = (type == CSS_TOKEN_EOF) ? NULL : (uint8_t *) data; } diff --git a/src/parse/properties/font.c b/src/parse/properties/font.c index c08d6e6..8d66aec 100644 --- a/src/parse/properties/font.c +++ b/src/parse/properties/font.c @@ -195,9 +195,7 @@ css_error css__parse_font(css_language *c, bool style = true; bool variant = true; bool weight = true; - bool size = true; bool line_height = true; - bool family = true; css_style *style_style; css_style *variant_style; css_style *weight_style; @@ -350,7 +348,6 @@ css_error css__parse_font(css_language *c, error = css__parse_font_size(c, vector, ctx, size_style); if (error != CSS_OK) goto css__parse_font_cleanup; - size = false; consumeWhitespace(vector, ctx); @@ -388,12 +385,6 @@ css_error css__parse_font(css_language *c, error = css__parse_font_family(c, vector, ctx, family_style); if (error != CSS_OK) goto css__parse_font_cleanup; - family = false; - - /* Must have size and family */ - assert(size != true); - assert(family != true); - /* defaults */ if (style) { diff --git a/src/select/properties/Makefile b/src/select/properties/Makefile index 7f48fab..b26939c 100644 --- a/src/select/properties/Makefile +++ b/src/select/properties/Makefile @@ -78,7 +78,7 @@ position.c \ quotes.c \ richness.c \ right.c \ -speach_rate.c \ +speech_rate.c \ speak.c \ speak_header.c \ speak_numeral.c \ diff --git a/src/select/properties/azimuth.c b/src/select/properties/azimuth.c index cb5fc61..275ae2f 100644 --- a/src/select/properties/azimuth.c +++ b/src/select/properties/azimuth.c @@ -15,15 +15,12 @@ css_error css__cascade_azimuth(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; css_fixed val = 0; uint32_t unit = UNIT_DEG; if (isInherit(opv) == false) { switch (getValue(opv) & ~AZIMUTH_BEHIND) { case AZIMUTH_ANGLE: - value = 0; - val = *((css_fixed *) style->bytecode); advance_bytecode(style, sizeof(val)); unit = *((uint32_t *) style->bytecode); diff --git a/src/select/properties/elevation.c b/src/select/properties/elevation.c index 12b8e22..d893748 100644 --- a/src/select/properties/elevation.c +++ b/src/select/properties/elevation.c @@ -17,15 +17,12 @@ css_error css__cascade_elevation(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; css_fixed val = 0; uint32_t unit = UNIT_DEG; if (isInherit(opv) == false) { switch (getValue(opv)) { case ELEVATION_ANGLE: - value = 0; - val = *((css_fixed *) style->bytecode); advance_bytecode(style, sizeof(val)); diff --git a/src/select/properties/page_break_inside.c b/src/select/properties/page_break_inside.c index b3d5114..2e27298 100644 --- a/src/select/properties/page_break_inside.c +++ b/src/select/properties/page_break_inside.c @@ -17,8 +17,6 @@ css_error css__cascade_page_break_inside(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; - UNUSED(style); if (isInherit(opv) == false) { @@ -26,7 +24,6 @@ css_error css__cascade_page_break_inside(uint32_t opv, css_style *style, case PAGE_BREAK_INSIDE_AUTO: case PAGE_BREAK_INSIDE_AVOID: /** \todo convert to public values */ - value = 0; break; } } diff --git a/src/select/properties/pitch.c b/src/select/properties/pitch.c index a8c65d1..b6dc649 100644 --- a/src/select/properties/pitch.c +++ b/src/select/properties/pitch.c @@ -17,15 +17,12 @@ css_error css__cascade_pitch(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; css_fixed freq = 0; uint32_t unit = UNIT_HZ; if (isInherit(opv) == false) { switch (getValue(opv)) { case PITCH_FREQUENCY: - value = 0; - freq = *((css_fixed *) style->bytecode); advance_bytecode(style, sizeof(freq)); unit = *((uint32_t *) style->bytecode); diff --git a/src/select/properties/play_during.c b/src/select/properties/play_during.c index cb1de3c..0210567 100644 --- a/src/select/properties/play_during.c +++ b/src/select/properties/play_during.c @@ -17,14 +17,11 @@ css_error css__cascade_play_during(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; lwc_string *uri = NULL; if (isInherit(opv) == false) { switch (getValue(opv)) { case PLAY_DURING_URI: - value = 0; - css__stylesheet_string_get(style->sheet, *((css_code_t *) style->bytecode), &uri); advance_bytecode(style, sizeof(css_code_t)); break; diff --git a/src/select/properties/speak.c b/src/select/properties/speak.c index 2b7d18f..0b52e62 100644 --- a/src/select/properties/speak.c +++ b/src/select/properties/speak.c @@ -17,8 +17,6 @@ css_error css__cascade_speak(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; - UNUSED(style); if (isInherit(opv) == false) { @@ -27,7 +25,6 @@ css_error css__cascade_speak(uint32_t opv, css_style *style, case SPEAK_NONE: case SPEAK_SPELL_OUT: /** \todo convert to public values */ - value = 0; break; } } diff --git a/src/select/properties/speak_header.c b/src/select/properties/speak_header.c index 50dbb41..6fc37d5 100644 --- a/src/select/properties/speak_header.c +++ b/src/select/properties/speak_header.c @@ -17,8 +17,6 @@ css_error css__cascade_speak_header(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; - UNUSED(style); if (isInherit(opv) == false) { @@ -26,7 +24,6 @@ css_error css__cascade_speak_header(uint32_t opv, css_style *style, case SPEAK_HEADER_ONCE: case SPEAK_HEADER_ALWAYS: /** \todo convert to public values */ - value = 0; break; } } diff --git a/src/select/properties/speak_numeral.c b/src/select/properties/speak_numeral.c index d2ff01d..1e74abd 100644 --- a/src/select/properties/speak_numeral.c +++ b/src/select/properties/speak_numeral.c @@ -17,8 +17,6 @@ css_error css__cascade_speak_numeral(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; - UNUSED(style); if (isInherit(opv) == false) { @@ -26,7 +24,6 @@ css_error css__cascade_speak_numeral(uint32_t opv, css_style *style, case SPEAK_NUMERAL_DIGITS: case SPEAK_NUMERAL_CONTINUOUS: /** \todo convert to public values */ - value = 0; break; } } diff --git a/src/select/properties/speak_punctuation.c b/src/select/properties/speak_punctuation.c index 928f425..9898b7c 100644 --- a/src/select/properties/speak_punctuation.c +++ b/src/select/properties/speak_punctuation.c @@ -17,8 +17,6 @@ css_error css__cascade_speak_punctuation( uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; - UNUSED(style); if (isInherit(opv) == false) { @@ -26,7 +24,6 @@ css_error css__cascade_speak_punctuation( case SPEAK_PUNCTUATION_CODE: case SPEAK_PUNCTUATION_NONE: /** \todo convert to public values */ - value = 0; break; } } diff --git a/src/select/properties/speach_rate.c b/src/select/properties/speech_rate.c index 290ce48..c974997 100644 --- a/src/select/properties/speach_rate.c +++ b/src/select/properties/speech_rate.c @@ -17,14 +17,11 @@ css_error css__cascade_speech_rate(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; css_fixed rate = 0; if (isInherit(opv) == false) { switch (getValue(opv)) { case SPEECH_RATE_SET: - value = 0; - rate = *((css_fixed *) style->bytecode); advance_bytecode(style, sizeof(rate)); break; diff --git a/src/select/properties/volume.c b/src/select/properties/volume.c index 16f6560..ca0e9dd 100644 --- a/src/select/properties/volume.c +++ b/src/select/properties/volume.c @@ -17,21 +17,16 @@ css_error css__cascade_volume(uint32_t opv, css_style *style, css_select_state *state) { - uint16_t value = 0; css_fixed val = 0; uint32_t unit = UNIT_PCT; if (isInherit(opv) == false) { switch (getValue(opv)) { case VOLUME_NUMBER: - value = 0; - val = *((css_fixed *) style->bytecode); advance_bytecode(style, sizeof(val)); break; case VOLUME_DIMENSION: - value = 0; - val = *((css_fixed *) style->bytecode); advance_bytecode(style, sizeof(val)); unit = *((uint32_t *) style->bytecode); |