From 24b8b9b227f53b4f67a713c994cec04a5f774634 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Mon, 23 Apr 2018 19:03:57 +0430 Subject: [PATCH] Resolve clang's used-but-marked-unused warnings --- src/hb-debug.hh | 4 ++-- src/hb-font.cc | 4 ++-- src/hb-ft.cc | 8 ++++---- src/hb-open-type-private.hh | 2 +- src/hb-ot-font.cc | 6 +++--- src/hb-ot-shape-complex-indic-machine.hh | 2 +- src/hb-ot-shape-complex-indic-machine.rl | 2 +- src/hb-ot-shape-complex-khmer-machine.hh | 2 +- src/hb-ot-shape-complex-khmer-machine.rl | 2 +- src/hb-ot-shape-complex-myanmar-machine.hh | 2 +- src/hb-ot-shape-complex-myanmar-machine.rl | 2 +- src/hb-ot-shape-complex-use-machine.hh | 2 +- src/hb-ot-shape-complex-use-machine.rl | 2 +- src/hb-set.cc | 2 +- src/hb-unicode.cc | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/hb-debug.hh b/src/hb-debug.hh index c244347b3..cbb716a7a 100644 --- a/src/hb-debug.hh +++ b/src/hb-debug.hh @@ -357,7 +357,7 @@ struct hb_no_trace_t { (&c->debug_depth, c->get_name (), this, HB_FUNC, \ " ") #else -#define TRACE_CLOSURE(this) hb_no_trace_t trace HB_UNUSED +#define TRACE_CLOSURE(this) hb_no_trace_t trace #endif #ifndef HB_DEBUG_COLLECT_GLYPHS @@ -369,7 +369,7 @@ struct hb_no_trace_t { (&c->debug_depth, c->get_name (), this, HB_FUNC, \ " ") #else -#define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t trace HB_UNUSED +#define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t trace #endif #ifndef HB_DEBUG_SANITIZE diff --git a/src/hb-font.cc b/src/hb-font.cc index f3534b686..4d62b9e9c 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -127,7 +127,7 @@ hb_font_get_variation_glyph_parent (hb_font_t *font, static hb_position_t -hb_font_get_glyph_h_advance_nil (hb_font_t *font HB_UNUSED, +hb_font_get_glyph_h_advance_nil (hb_font_t *font, void *font_data HB_UNUSED, hb_codepoint_t glyph, void *user_data HB_UNUSED) @@ -144,7 +144,7 @@ hb_font_get_glyph_h_advance_parent (hb_font_t *font, } static hb_position_t -hb_font_get_glyph_v_advance_nil (hb_font_t *font HB_UNUSED, +hb_font_get_glyph_v_advance_nil (hb_font_t *font, void *font_data HB_UNUSED, hb_codepoint_t glyph, void *user_data HB_UNUSED) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index aa6c1a100..691323864 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -210,7 +210,7 @@ hb_ft_get_variation_glyph (hb_font_t *font HB_UNUSED, } static hb_position_t -hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED, +hb_ft_get_glyph_h_advance (hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data HB_UNUSED) @@ -228,7 +228,7 @@ hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED, } static hb_position_t -hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED, +hb_ft_get_glyph_v_advance (hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data HB_UNUSED) @@ -248,7 +248,7 @@ hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED, } static hb_bool_t -hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED, +hb_ft_get_glyph_v_origin (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_position_t *x, @@ -292,7 +292,7 @@ hb_ft_get_glyph_h_kerning (hb_font_t *font, } static hb_bool_t -hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED, +hb_ft_get_glyph_extents (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_glyph_extents_t *extents, diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 1f2421b07..382fccb25 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -288,7 +288,7 @@ struct hb_sanitize_context_t : return likely (this->check_range (obj, obj->min_size)); } - inline bool may_edit (const void *base HB_UNUSED, unsigned int len HB_UNUSED) + inline bool may_edit (const void *base, unsigned int len) { if (this->edit_count >= HB_SANITIZE_MAX_EDITS) return false; diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 5e7a6da0c..831023032 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -143,7 +143,7 @@ hb_ot_get_glyph_h_kerning (hb_font_t *font, } static hb_bool_t -hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED, +hb_ot_get_glyph_extents (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_glyph_extents_t *extents, @@ -184,7 +184,7 @@ hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED, } static hb_bool_t -hb_ot_get_font_h_extents (hb_font_t *font HB_UNUSED, +hb_ot_get_font_h_extents (hb_font_t *font, void *font_data, hb_font_extents_t *metrics, void *user_data HB_UNUSED) @@ -198,7 +198,7 @@ hb_ot_get_font_h_extents (hb_font_t *font HB_UNUSED, } static hb_bool_t -hb_ot_get_font_v_extents (hb_font_t *font HB_UNUSED, +hb_ot_get_font_v_extents (hb_font_t *font, void *font_data, hb_font_extents_t *metrics, void *user_data HB_UNUSED) diff --git a/src/hb-ot-shape-complex-indic-machine.hh b/src/hb-ot-shape-complex-indic-machine.hh index f3cea2271..d0b008281 100644 --- a/src/hb-ot-shape-complex-indic-machine.hh +++ b/src/hb-ot-shape-complex-indic-machine.hh @@ -1129,7 +1129,7 @@ static const int indic_syllable_machine_en_main = 166; static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl index 0ea91c0cf..e50fe1656 100644 --- a/src/hb-ot-shape-complex-indic-machine.rl +++ b/src/hb-ot-shape-complex-indic-machine.rl @@ -104,7 +104,7 @@ main := |* static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; %%{ diff --git a/src/hb-ot-shape-complex-khmer-machine.hh b/src/hb-ot-shape-complex-khmer-machine.hh index 380705a50..a5ed55f6c 100644 --- a/src/hb-ot-shape-complex-khmer-machine.hh +++ b/src/hb-ot-shape-complex-khmer-machine.hh @@ -173,7 +173,7 @@ static const int khmer_syllable_machine_en_main = 10; static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; diff --git a/src/hb-ot-shape-complex-khmer-machine.rl b/src/hb-ot-shape-complex-khmer-machine.rl index 8b00c37f0..bb535dadc 100644 --- a/src/hb-ot-shape-complex-khmer-machine.rl +++ b/src/hb-ot-shape-complex-khmer-machine.rl @@ -86,7 +86,7 @@ main := |* static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; %%{ diff --git a/src/hb-ot-shape-complex-myanmar-machine.hh b/src/hb-ot-shape-complex-myanmar-machine.hh index fb67dd42e..94fa78827 100644 --- a/src/hb-ot-shape-complex-myanmar-machine.hh +++ b/src/hb-ot-shape-complex-myanmar-machine.hh @@ -294,7 +294,7 @@ static const int myanmar_syllable_machine_en_main = 0; static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; diff --git a/src/hb-ot-shape-complex-myanmar-machine.rl b/src/hb-ot-shape-complex-myanmar-machine.rl index 0cd84fa1b..860ac5f9f 100644 --- a/src/hb-ot-shape-complex-myanmar-machine.rl +++ b/src/hb-ot-shape-complex-myanmar-machine.rl @@ -106,7 +106,7 @@ main := |* static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; %%{ diff --git a/src/hb-ot-shape-complex-use-machine.hh b/src/hb-ot-shape-complex-use-machine.hh index 0bf3ad302..041450c92 100644 --- a/src/hb-ot-shape-complex-use-machine.hh +++ b/src/hb-ot-shape-complex-use-machine.hh @@ -331,7 +331,7 @@ static const int use_syllable_machine_en_main = 4; static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; diff --git a/src/hb-ot-shape-complex-use-machine.rl b/src/hb-ot-shape-complex-use-machine.rl index 11fb47020..e5910a442 100644 --- a/src/hb-ot-shape-complex-use-machine.rl +++ b/src/hb-ot-shape-complex-use-machine.rl @@ -153,7 +153,7 @@ main := |* static void find_syllables (hb_buffer_t *buffer) { - unsigned int p, pe, eof, ts HB_UNUSED, te HB_UNUSED, act HB_UNUSED; + unsigned int p, pe, eof, ts, te, act; int cs; hb_glyph_info_t *info = buffer->info; %%{ diff --git a/src/hb-set.cc b/src/hb-set.cc index 07cf9d09b..af590ef37 100644 --- a/src/hb-set.cc +++ b/src/hb-set.cc @@ -150,7 +150,7 @@ hb_set_get_user_data (hb_set_t *set, * Since: 0.9.2 **/ hb_bool_t -hb_set_allocation_successful (const hb_set_t *set HB_UNUSED) +hb_set_allocation_successful (const hb_set_t *set) { return !set->in_error; } diff --git a/src/hb-unicode.cc b/src/hb-unicode.cc index 726baeb0f..2d16c2e3a 100644 --- a/src/hb-unicode.cc +++ b/src/hb-unicode.cc @@ -64,7 +64,7 @@ hb_unicode_general_category_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED, static hb_codepoint_t hb_unicode_mirroring_nil (hb_unicode_funcs_t *ufuncs HB_UNUSED, - hb_codepoint_t unicode HB_UNUSED, + hb_codepoint_t unicode, void *user_data HB_UNUSED) { return unicode;