From 9f377ed3210fe7d9f15e0c4f82020556f9a8f6f0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 13 May 2012 16:13:44 +0200 Subject: [PATCH] Fix more unused-var warnings --- src/hb-ot-shape-complex-arabic.cc | 7 +++++-- src/hb-ot-shape-complex-indic.cc | 25 ++++++++++++++++++------- src/hb-ot-shape-complex-misc.cc | 21 +++++++++++++++------ src/hb-ot-shape-normalize.cc | 13 ++++++------- src/hb-set.cc | 2 +- 5 files changed, 45 insertions(+), 23 deletions(-) diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index 8a590bb01..54460f011 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -165,7 +165,8 @@ static const struct arabic_state_table_entry { void -_hb_ot_shape_complex_collect_features_arabic (hb_ot_map_builder_t *map, const hb_segment_properties_t *props) +_hb_ot_shape_complex_collect_features_arabic (hb_ot_map_builder_t *map, + const hb_segment_properties_t *props) { /* For Language forms (in ArabicOT speak), we do the iso/fina/medi/init together, * then rlig and calt each in their own stage. This makes IranNastaliq's ALLAH @@ -240,7 +241,9 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer) } void -_hb_ot_shape_complex_setup_masks_arabic (hb_ot_map_t *map, hb_buffer_t *buffer, hb_font_t *font) +_hb_ot_shape_complex_setup_masks_arabic (hb_ot_map_t *map, + hb_buffer_t *buffer, + hb_font_t *font) { unsigned int count = buffer->len; unsigned int prev = 0, state = 0; diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index e4273c9b7..660777806 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -153,7 +153,8 @@ final_reordering (const hb_ot_map_t *map, void *user_data HB_UNUSED); void -_hb_ot_shape_complex_collect_features_indic (hb_ot_map_builder_t *map, const hb_segment_properties_t *props) +_hb_ot_shape_complex_collect_features_indic (hb_ot_map_builder_t *map, + const hb_segment_properties_t *props HB_UNUSED) { map->add_bool_feature (HB_TAG('l','o','c','l')); /* The Indic specs do not require ccmp, but we apply it here since if @@ -185,7 +186,9 @@ _hb_ot_shape_complex_normalization_preference_indic (void) void -_hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map, hb_buffer_t *buffer, hb_font_t *font) +_hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map HB_UNUSED, + hb_buffer_t *buffer, + hb_font_t *font) { HB_BUFFER_ALLOCATE_VAR (buffer, indic_category); HB_BUFFER_ALLOCATE_VAR (buffer, indic_position); @@ -322,7 +325,9 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff } static void -initial_reordering_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array, +initial_reordering_syllable (const hb_ot_map_t *map, + hb_buffer_t *buffer, + hb_mask_t *mask_array, unsigned int start, unsigned int end, unsigned int base) { hb_glyph_info_t *info = buffer->info; @@ -474,7 +479,9 @@ initial_reordering_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mas static void -initial_reordering_vowel_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array, +initial_reordering_vowel_syllable (const hb_ot_map_t *map, + hb_buffer_t *buffer, + hb_mask_t *mask_array, unsigned int start, unsigned int end) { /* We made the vowels look like consonants. So let's call the consonant logic! */ @@ -482,7 +489,9 @@ initial_reordering_vowel_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, } static void -initial_reordering_standalone_cluster (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array, +initial_reordering_standalone_cluster (const hb_ot_map_t *map, + hb_buffer_t *buffer, + hb_mask_t *mask_array, unsigned int start, unsigned int end) { /* We treat NBSP/dotted-circle as if they are consonants, so we should just chain. @@ -501,8 +510,10 @@ initial_reordering_standalone_cluster (const hb_ot_map_t *map, hb_buffer_t *buff } static void -initial_reordering_non_indic (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array, - unsigned int start, unsigned int end) +initial_reordering_non_indic (const hb_ot_map_t *map HB_UNUSED, + hb_buffer_t *buffer HB_UNUSED, + hb_mask_t *mask_array HB_UNUSED, + unsigned int start, unsigned int end) { /* Nothing to do right now. If we ever switch to using the output * buffer in the reordering process, we'd need to next_glyph() here. */ diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc index 1416a0d94..d93d4c672 100644 --- a/src/hb-ot-shape-complex-misc.cc +++ b/src/hb-ot-shape-complex-misc.cc @@ -37,7 +37,8 @@ */ void -_hb_ot_shape_complex_collect_features_default (hb_ot_map_builder_t *map, const hb_segment_properties_t *props) +_hb_ot_shape_complex_collect_features_default (hb_ot_map_builder_t *map HB_UNUSED, + const hb_segment_properties_t *props HB_UNUSED) { } @@ -48,7 +49,9 @@ _hb_ot_shape_complex_normalization_preference_default (void) } void -_hb_ot_shape_complex_setup_masks_default (hb_ot_map_t *map, hb_buffer_t *buffer, hb_font_t *font) +_hb_ot_shape_complex_setup_masks_default (hb_ot_map_t *map HB_UNUSED, + hb_buffer_t *buffer HB_UNUSED, + hb_font_t *font HB_UNUSED) { } @@ -64,7 +67,8 @@ static const hb_tag_t hangul_features[] = }; void -_hb_ot_shape_complex_collect_features_hangul (hb_ot_map_builder_t *map, const hb_segment_properties_t *props) +_hb_ot_shape_complex_collect_features_hangul (hb_ot_map_builder_t *map, + const hb_segment_properties_t *props HB_UNUSED) { for (unsigned int i = 0; i < ARRAY_LENGTH (hangul_features); i++) map->add_bool_feature (hangul_features[i]); @@ -77,7 +81,9 @@ _hb_ot_shape_complex_normalization_preference_hangul (void) } void -_hb_ot_shape_complex_setup_masks_hangul (hb_ot_map_t *map, hb_buffer_t *buffer, hb_font_t *font) +_hb_ot_shape_complex_setup_masks_hangul (hb_ot_map_t *map HB_UNUSED, + hb_buffer_t *buffer HB_UNUSED, + hb_font_t *font HB_UNUSED) { } @@ -86,7 +92,8 @@ _hb_ot_shape_complex_setup_masks_hangul (hb_ot_map_t *map, hb_buffer_t *buffer, /* Thai / Lao shaper */ void -_hb_ot_shape_complex_collect_features_thai (hb_ot_map_builder_t *map, const hb_segment_properties_t *props) +_hb_ot_shape_complex_collect_features_thai (hb_ot_map_builder_t *map HB_UNUSED, + const hb_segment_properties_t *props HB_UNUSED) { } @@ -97,7 +104,9 @@ _hb_ot_shape_complex_normalization_preference_thai (void) } void -_hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map, hb_buffer_t *buffer, hb_font_t *font) +_hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map HB_UNUSED, + hb_buffer_t *buffer, + hb_font_t *font HB_UNUSED) { /* The following is NOT specified in the MS OT Thai spec, however, it seems * to be what Uniscribe and other engines implement. According to Eric Muller: diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index e237800d0..a9019fb72 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -69,8 +69,7 @@ */ static void -output_glyph (hb_font_t *font, hb_buffer_t *buffer, - hb_codepoint_t glyph) +output_glyph (hb_buffer_t *buffer, hb_codepoint_t glyph) { buffer->output_glyph (glyph); _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer->unicode); @@ -90,22 +89,22 @@ decompose (hb_font_t *font, hb_buffer_t *buffer, bool has_a = hb_font_get_glyph (font, a, 0, &glyph); if (shortest && has_a) { /* Output a and b */ - output_glyph (font, buffer, a); + output_glyph (buffer, a); if (b) - output_glyph (font, buffer, b); + output_glyph (buffer, b); return TRUE; } if (decompose (font, buffer, shortest, a)) { if (b) - output_glyph (font, buffer, b); + output_glyph (buffer, b); return TRUE; } if (has_a) { - output_glyph (font, buffer, a); + output_glyph (buffer, a); if (b) - output_glyph (font, buffer, b); + output_glyph (buffer, b); return TRUE; } diff --git a/src/hb-set.cc b/src/hb-set.cc index 0a0bc6138..9d013a13f 100644 --- a/src/hb-set.cc +++ b/src/hb-set.cc @@ -91,7 +91,7 @@ hb_set_get_user_data (hb_set_t *set, hb_bool_t -hb_set_allocation_successful (hb_set_t *set) +hb_set_allocation_successful (hb_set_t *set HB_UNUSED) { return TRUE; }