From 39bd07aed5fe6ccddde53206bafceec32d56dcc1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 26 Oct 2018 21:01:11 -0700 Subject: [PATCH] Fix bunch of unused parameter warnings Show up with gcc -O0. There's a few more but those are functions that need to be filled in. Maybe this is a lost battle... --- src/gen-vowel-constraints.py | 4 +-- src/hb-aat-layout-common.hh | 7 +++-- src/hb-aat-layout-kerx-table.hh | 4 +-- src/hb-aat-layout-morx-table.hh | 10 +++---- src/hb-face.cc | 2 +- src/hb-font.cc | 29 ++++++++++---------- src/hb-graphite2.cc | 9 ++++-- src/hb-machinery.hh | 4 +-- src/hb-ot-color-cbdt-table.hh | 2 +- src/hb-ot-glyf-table.hh | 4 +-- src/hb-ot-hmtx-table.hh | 2 +- src/hb-ot-layout-gpos-table.hh | 2 +- src/hb-ot-math-table.hh | 2 +- src/hb-ot-maxp-table.hh | 2 +- src/hb-ot-shape-complex-arabic-fallback.hh | 6 ++-- src/hb-ot-shape-complex-arabic.cc | 6 ++-- src/hb-ot-shape-complex-hangul.cc | 2 +- src/hb-ot-shape-complex-khmer.cc | 2 +- src/hb-ot-shape-complex-myanmar.cc | 6 ++-- src/hb-ot-shape-complex-use.cc | 8 +++--- src/hb-ot-shape-complex-vowel-constraints.cc | 4 +-- src/hb-ot-shape-fallback.cc | 4 +-- src/hb-ot-shape-normalize.cc | 4 ++- src/hb-ot-shape.cc | 2 +- src/hb-ot-tag.cc | 3 +- src/hb-ot-vorg-table.hh | 2 +- src/hb-set.cc | 2 +- src/hb-shape-plan.cc | 2 +- src/hb-utf.hh | 2 +- 29 files changed, 73 insertions(+), 65 deletions(-) diff --git a/src/gen-vowel-constraints.py b/src/gen-vowel-constraints.py index 02a338fa5..c4e75aa96 100755 --- a/src/gen-vowel-constraints.py +++ b/src/gen-vowel-constraints.py @@ -176,9 +176,9 @@ print ('}') print () print ('void') -print ('_hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan,') +print ('_hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,') print ('\t\t\t\t hb_buffer_t *buffer,') -print ('\t\t\t\t hb_font_t *font)') +print ('\t\t\t\t hb_font_t *font HB_UNUSED)') print ('{') print (' /* UGLY UGLY UGLY business of adding dotted-circle in the middle of') print (' * vowel-sequences that look like another vowel. Data for each script') diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 406a36d8c..ce40abd55 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -377,7 +377,10 @@ struct Entry /* Note, we don't recurse-sanitize data because we don't access it. * That said, in our DEFINE_SIZE_STATIC we access T::static_size, * which ensures that data has a simple sanitize(). To be determined - * if I need to remove that as well. */ + * if I need to remove that as well. + * + * XXX Because we are a template, our DEFINE_SIZE_STATIC assertion + * wouldn't be checked. */ return_trace (c->check_struct (this)); } @@ -394,7 +397,7 @@ struct Entry template <> struct Entry { - inline bool sanitize (hb_sanitize_context_t *c, unsigned int count) const + inline bool sanitize (hb_sanitize_context_t *c, unsigned int count /*XXX Unused?*/) const { TRACE_SANITIZE (this); return_trace (c->check_struct (this)); diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 960c37e11..a88312501 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -163,7 +163,7 @@ struct KerxSubTableFormat1 kernAction (&table->machine + table->kernAction), depth (0) {} - inline bool is_actionable (StateTableDriver *driver, + inline bool is_actionable (StateTableDriver *driver HB_UNUSED, const Entry *entry) { return entry->data.kernActionIndex != 0xFFFF; @@ -365,7 +365,7 @@ struct KerxSubTableFormat4 mark_set (false), mark (0) {} - inline bool is_actionable (StateTableDriver *driver, + inline bool is_actionable (StateTableDriver *driver HB_UNUSED, const Entry *entry) { return entry->data.ankrActionIndex != 0xFFFF; diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 84e321edc..22a994431 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -65,11 +65,11 @@ struct RearrangementSubtable Verb = 0x000F, /* The type of rearrangement specified. */ }; - inline driver_context_t (const RearrangementSubtable *table) : + inline driver_context_t (const RearrangementSubtable *table HB_UNUSED) : ret (false), start (0), end (0) {} - inline bool is_actionable (StateTableDriver *driver, + inline bool is_actionable (StateTableDriver *driver HB_UNUSED, const Entry *entry) { return (entry->flags & Verb) && start < end; @@ -363,7 +363,7 @@ struct LigatureSubtable ligature (table+table->ligature), match_length (0) {} - inline bool is_actionable (StateTableDriver *driver, + inline bool is_actionable (StateTableDriver *driver HB_UNUSED, const Entry *entry) { return entry->flags & PerformAction; @@ -620,7 +620,7 @@ struct InsertionSubtable mark (0), insertionAction (table+table->insertionAction) {} - inline bool is_actionable (StateTableDriver *driver, + inline bool is_actionable (StateTableDriver *driver HB_UNUSED, const Entry *entry) { return (entry->flags & (CurrentInsertCount | MarkedInsertCount)) && @@ -937,7 +937,7 @@ struct Chain inline unsigned int get_size (void) const { return length; } - inline bool sanitize (hb_sanitize_context_t *c, unsigned int version) const + inline bool sanitize (hb_sanitize_context_t *c, unsigned int version HB_UNUSED) const { TRACE_SANITIZE (this); if (!length.sanitize (c) || diff --git a/src/hb-face.cc b/src/hb-face.cc index bba1ee3fa..74c77721f 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -666,7 +666,7 @@ _hb_face_builder_data_reference_blob (hb_face_builder_data_t *data) } static hb_blob_t * -_hb_face_builder_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data) +_hb_face_builder_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) { hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data; diff --git a/src/hb-font.cc b/src/hb-font.cc index b6b668dd8..e38c2fbd3 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -89,7 +89,7 @@ hb_font_get_font_v_extents_default (hb_font_t *font, static hb_bool_t hb_font_get_nominal_glyph_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t unicode, + hb_codepoint_t unicode HB_UNUSED, hb_codepoint_t *glyph, void *user_data HB_UNUSED) { @@ -142,8 +142,8 @@ hb_font_get_nominal_glyphs_default (hb_font_t *font, static hb_bool_t hb_font_get_variation_glyph_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t unicode, - hb_codepoint_t variation_selector, + hb_codepoint_t unicode HB_UNUSED, + hb_codepoint_t variation_selector HB_UNUSED, hb_codepoint_t *glyph, void *user_data HB_UNUSED) { @@ -276,7 +276,7 @@ hb_font_get_glyph_v_advances_default (hb_font_t* font, static hb_bool_t hb_font_get_glyph_h_origin_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t glyph, + hb_codepoint_t glyph HB_UNUSED, hb_position_t *x, hb_position_t *y, void *user_data HB_UNUSED) @@ -301,7 +301,7 @@ hb_font_get_glyph_h_origin_default (hb_font_t *font, static hb_bool_t hb_font_get_glyph_v_origin_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t glyph, + hb_codepoint_t glyph HB_UNUSED, hb_position_t *x, hb_position_t *y, void *user_data HB_UNUSED) @@ -326,8 +326,8 @@ hb_font_get_glyph_v_origin_default (hb_font_t *font, static hb_position_t hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t left_glyph, - hb_codepoint_t right_glyph, + hb_codepoint_t left_glyph HB_UNUSED, + hb_codepoint_t right_glyph HB_UNUSED, void *user_data HB_UNUSED) { return 0; @@ -345,8 +345,8 @@ hb_font_get_glyph_h_kerning_default (hb_font_t *font, static hb_position_t hb_font_get_glyph_v_kerning_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t top_glyph, - hb_codepoint_t bottom_glyph, + hb_codepoint_t top_glyph HB_UNUSED, + hb_codepoint_t bottom_glyph HB_UNUSED, void *user_data HB_UNUSED) { return 0; @@ -364,7 +364,7 @@ hb_font_get_glyph_v_kerning_default (hb_font_t *font, static hb_bool_t hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t glyph, + hb_codepoint_t glyph HB_UNUSED, hb_glyph_extents_t *extents, void *user_data HB_UNUSED) { @@ -389,8 +389,8 @@ hb_font_get_glyph_extents_default (hb_font_t *font, static hb_bool_t hb_font_get_glyph_contour_point_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t glyph, - unsigned int point_index, + hb_codepoint_t glyph HB_UNUSED, + unsigned int point_index HB_UNUSED, hb_position_t *x, hb_position_t *y, void *user_data HB_UNUSED) @@ -416,7 +416,7 @@ hb_font_get_glyph_contour_point_default (hb_font_t *font, static hb_bool_t hb_font_get_glyph_name_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - hb_codepoint_t glyph, + hb_codepoint_t glyph HB_UNUSED, char *name, unsigned int size, void *user_data HB_UNUSED) { @@ -436,7 +436,8 @@ hb_font_get_glyph_name_default (hb_font_t *font, static hb_bool_t hb_font_get_glyph_from_name_nil (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED, - const char *name, int len, /* -1 means nul-terminated */ + const char *name HB_UNUSED, + int len HB_UNUSED, /* -1 means nul-terminated */ hb_codepoint_t *glyph, void *user_data HB_UNUSED) { diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index 6b2b6f19d..1b73f9f4f 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -197,11 +197,14 @@ _hb_graphite2_shaper_font_data_destroy (hb_graphite2_font_data_t *data HB_UNUSED { } -/* +/** + * hb_graphite2_font_get_gr_font: + * * Since: 0.9.10 + * Deprecated: 1.4.2 */ gr_font * -hb_graphite2_font_get_gr_font (hb_font_t *font) +hb_graphite2_font_get_gr_font (hb_font_t *font HB_UNUSED) { return nullptr; } @@ -243,7 +246,7 @@ struct hb_graphite2_cluster_t { }; hb_bool_t -_hb_graphite2_shape (hb_shape_plan_t *shape_plan, +_hb_graphite2_shape (hb_shape_plan_t *shape_plan HB_UNUSED, hb_font_t *font, hb_buffer_t *buffer, const hb_feature_t *features, diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index 35cbc155f..2b238131a 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -136,7 +136,7 @@ struct hb_dispatch_context_t enum { max_debug_depth = MaxDebugDepth }; typedef Return return_t; template - inline bool may_dispatch (const T *obj, const F *format) { return true; } + inline bool may_dispatch (const T *obj HB_UNUSED, const F *format HB_UNUSED) { return true; } static return_t no_dispatch_return_value (void) { return Context::default_return_value (); } }; @@ -235,7 +235,7 @@ struct hb_sanitize_context_t : inline const char *get_name (void) { return "SANITIZE"; } template - inline bool may_dispatch (const T *obj, const F *format) + inline bool may_dispatch (const T *obj HB_UNUSED, const F *format) { return format->sanitize (this); } template inline return_t dispatch (const T &obj) { return obj.sanitize (this); } diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh index 1e1fe0956..f807d6129 100644 --- a/src/hb-ot-color-cbdt-table.hh +++ b/src/hb-ot-color-cbdt-table.hh @@ -166,7 +166,7 @@ struct IndexSubtable } } - inline bool get_extents (hb_glyph_extents_t *extents) const + inline bool get_extents (hb_glyph_extents_t *extents HB_UNUSED) const { switch (u.header.indexFormat) { case 2: case 5: /* TODO */ diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 2145ac02b..9437a83d8 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -47,7 +47,7 @@ struct loca static const hb_tag_t tableTag = HB_OT_TAG_loca; - inline bool sanitize (hb_sanitize_context_t *c) const + inline bool sanitize (hb_sanitize_context_t *c HB_UNUSED) const { TRACE_SANITIZE (this); return_trace (true); @@ -70,7 +70,7 @@ struct glyf { static const hb_tag_t tableTag = HB_OT_TAG_glyf; - inline bool sanitize (hb_sanitize_context_t *c) const + inline bool sanitize (hb_sanitize_context_t *c HB_UNUSED) const { TRACE_SANITIZE (this); /* We don't check for anything specific here. The users of the diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh index 935ddd720..607358584 100644 --- a/src/hb-ot-hmtx-table.hh +++ b/src/hb-ot-hmtx-table.hh @@ -56,7 +56,7 @@ struct LongMetric template struct hmtxvmtx { - inline bool sanitize (hb_sanitize_context_t *c) const + inline bool sanitize (hb_sanitize_context_t *c HB_UNUSED) const { TRACE_SANITIZE (this); /* We don't check for anything specific here. The users of the diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index dd4e62792..8a6c0278f 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1715,7 +1715,7 @@ GPOS::position_start (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) } void -GPOS::position_finish_advances (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) +GPOS::position_finish_advances (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer HB_UNUSED) { //_hb_buffer_assert_gsubgpos_vars (buffer); } diff --git a/src/hb-ot-math-table.hh b/src/hb-ot-math-table.hh index 2f871124c..e20935972 100644 --- a/src/hb-ot-math-table.hh +++ b/src/hb-ot-math-table.hh @@ -631,7 +631,7 @@ struct MathVariants inline const MathGlyphConstruction & get_glyph_construction (hb_codepoint_t glyph, hb_direction_t direction, - hb_font_t *font) const + hb_font_t *font HB_UNUSED) const { bool vertical = HB_DIRECTION_IS_VERTICAL (direction); unsigned int count = vertical ? vertGlyphCount : horizGlyphCount; diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh index 2572ad288..648f232d9 100644 --- a/src/hb-ot-maxp-table.hh +++ b/src/hb-ot-maxp-table.hh @@ -117,7 +117,7 @@ struct maxp return result; } - static inline void drop_hint_fields (hb_subset_plan_t *plan, maxp *maxp_prime) + static inline void drop_hint_fields (hb_subset_plan_t *plan HB_UNUSED, maxp *maxp_prime) { if (maxp_prime->version.major == 1) { diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh index 2aa036728..f64e2dd6e 100644 --- a/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/hb-ot-shape-complex-arabic-fallback.hh @@ -220,9 +220,9 @@ struct ManifestLookup typedef OT::ArrayOf Manifest; static bool -arabic_fallback_plan_init_win1256 (arabic_fallback_plan_t *fallback_plan, - const hb_ot_shape_plan_t *plan, - hb_font_t *font) +arabic_fallback_plan_init_win1256 (arabic_fallback_plan_t *fallback_plan HB_UNUSED, + const hb_ot_shape_plan_t *plan HB_UNUSED, + hb_font_t *font HB_UNUSED) { #ifdef HB_WITH_WIN1256 /* Does this font look like it's Windows-1256-encoded? */ diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index b56443910..1fbd14a4c 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -416,7 +416,7 @@ retry: static void record_stch (const hb_ot_shape_plan_t *plan, - hb_font_t *font, + hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) { const arabic_shape_plan_t *arabic_plan = (const arabic_shape_plan_t *) plan->data; @@ -440,7 +440,7 @@ record_stch (const hb_ot_shape_plan_t *plan, } static void -apply_stch (const hb_ot_shape_plan_t *plan, +apply_stch (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_buffer_t *buffer, hb_font_t *font) { @@ -626,7 +626,7 @@ info_is_mcm (const hb_glyph_info_t &info) } static void -reorder_marks_arabic (const hb_ot_shape_plan_t *plan, +reorder_marks_arabic (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_buffer_t *buffer, unsigned int start, unsigned int end) diff --git a/src/hb-ot-shape-complex-hangul.cc b/src/hb-ot-shape-complex-hangul.cc index 959540258..38e4dbba6 100644 --- a/src/hb-ot-shape-complex-hangul.cc +++ b/src/hb-ot-shape-complex-hangul.cc @@ -128,7 +128,7 @@ is_zero_width_char (hb_font_t *font, } static void -preprocess_text_hangul (const hb_ot_shape_plan_t *plan, +preprocess_text_hangul (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_buffer_t *buffer, hb_font_t *font) { diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index 21db351fc..ecb80195f 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -267,7 +267,7 @@ setup_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED, static void reorder_consonant_syllable (const hb_ot_shape_plan_t *plan, - hb_face_t *face, + hb_face_t *face HB_UNUSED, hb_buffer_t *buffer, unsigned int start, unsigned int end) { diff --git a/src/hb-ot-shape-complex-myanmar.cc b/src/hb-ot-shape-complex-myanmar.cc index 30fa82579..dcada261c 100644 --- a/src/hb-ot-shape-complex-myanmar.cc +++ b/src/hb-ot-shape-complex-myanmar.cc @@ -274,8 +274,8 @@ initial_reordering_consonant_syllable (hb_buffer_t *buffer, } static void -initial_reordering_syllable (const hb_ot_shape_plan_t *plan, - hb_face_t *face, +initial_reordering_syllable (const hb_ot_shape_plan_t *plan HB_UNUSED, + hb_face_t *face HB_UNUSED, hb_buffer_t *buffer, unsigned int start, unsigned int end) { @@ -362,7 +362,7 @@ reorder (const hb_ot_shape_plan_t *plan, } static void -clear_syllables (const hb_ot_shape_plan_t *plan, +clear_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) { diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc index 7814e2c67..1bbf9805c 100644 --- a/src/hb-ot-shape-complex-use.cc +++ b/src/hb-ot-shape-complex-use.cc @@ -379,7 +379,7 @@ setup_syllables (const hb_ot_shape_plan_t *plan, } static void -clear_substitution_flags (const hb_ot_shape_plan_t *plan, +clear_substitution_flags (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) { @@ -391,7 +391,7 @@ clear_substitution_flags (const hb_ot_shape_plan_t *plan, static void record_rphf (const hb_ot_shape_plan_t *plan, - hb_font_t *font, + hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) { const use_shape_plan_t *use_plan = (const use_shape_plan_t *) plan->data; @@ -413,8 +413,8 @@ record_rphf (const hb_ot_shape_plan_t *plan, } static void -record_pref (const hb_ot_shape_plan_t *plan, - hb_font_t *font, +record_pref (const hb_ot_shape_plan_t *plan HB_UNUSED, + hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) { hb_glyph_info_t *info = buffer->info; diff --git a/src/hb-ot-shape-complex-vowel-constraints.cc b/src/hb-ot-shape-complex-vowel-constraints.cc index aae5936a2..20af8711e 100644 --- a/src/hb-ot-shape-complex-vowel-constraints.cc +++ b/src/hb-ot-shape-complex-vowel-constraints.cc @@ -30,9 +30,9 @@ _output_with_dotted_circle (hb_buffer_t *buffer) } void -_hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan, +_hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_buffer_t *buffer, - hb_font_t *font) + hb_font_t *font HB_UNUSED) { /* UGLY UGLY UGLY business of adding dotted-circle in the middle of * vowel-sequences that look like another vowel. Data for each script diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc index 4c5ccc974..94bc4afb1 100644 --- a/src/hb-ot-shape-fallback.cc +++ b/src/hb-ot-shape-fallback.cc @@ -192,7 +192,7 @@ zero_mark_advances (hb_buffer_t *buffer, } static inline void -position_mark (const hb_ot_shape_plan_t *plan, +position_mark (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font, hb_buffer_t *buffer, hb_glyph_extents_t &base_extents, @@ -472,7 +472,7 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan, /* Adjusts width of various spaces. */ void -_hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan, +_hb_ot_shape_fallback_spaces (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font, hb_buffer_t *buffer) { diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index a8229a98d..2164f7ad5 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -213,7 +213,9 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor } static inline void -handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end, bool short_circuit) +handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, + unsigned int end, + bool short_circuit HB_UNUSED) { /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */ hb_buffer_t * const buffer = c->buffer; diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 065b4d4bf..32c502048 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -276,7 +276,7 @@ _hb_ot_shaper_font_data_create (hb_font_t *font HB_UNUSED) } void -_hb_ot_shaper_font_data_destroy (hb_ot_font_data_t *data) +_hb_ot_shaper_font_data_destroy (hb_ot_font_data_t *data HB_UNUSED) { } diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc index 4dba9c31a..a569b8c22 100644 --- a/src/hb-ot-tag.cc +++ b/src/hb-ot-tag.cc @@ -242,7 +242,6 @@ hb_ot_tag_from_language (hb_language_t language) static void hb_ot_tags_from_language (const char *lang_str, const char *limit, - const char *private_use_subtag, unsigned int *count, hb_tag_t *tags) { @@ -389,7 +388,7 @@ hb_ot_tags_from_script_and_language (hb_script_t script, needs_language = parse_private_use_subtag (private_use_subtag, language_count, language_tags, "-hbot", TOUPPER); if (needs_language && language_count && language_tags && *language_count) - hb_ot_tags_from_language (lang_str, limit, private_use_subtag, language_count, language_tags); + hb_ot_tags_from_language (lang_str, limit, language_count, language_tags); } if (needs_script && script_count && script_tags && *script_count) diff --git a/src/hb-ot-vorg-table.hh b/src/hb-ot-vorg-table.hh index b6494b51f..98af00e14 100644 --- a/src/hb-ot-vorg-table.hh +++ b/src/hb-ot-vorg-table.hh @@ -70,7 +70,7 @@ struct VORG return defaultVertOriginY; } - inline bool _subset (const hb_subset_plan_t *plan, + inline bool _subset (const hb_subset_plan_t *plan HB_UNUSED, const VORG *vorg_table, const hb_vector_t &subset_metrics, unsigned int dest_sz, diff --git a/src/hb-set.cc b/src/hb-set.cc index 09dc4b483..25c19147f 100644 --- a/src/hb-set.cc +++ b/src/hb-set.cc @@ -391,7 +391,7 @@ hb_set_symmetric_difference (hb_set_t *set, * Deprecated: 1.6.1 **/ void -hb_set_invert (hb_set_t *set) +hb_set_invert (hb_set_t *set HB_UNUSED) { } diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index b2289f869..dea2c8c7b 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -441,7 +441,7 @@ hb_non_global_user_features_present (const hb_feature_t *user_features, } static inline hb_bool_t -hb_coords_present (const int *coords, +hb_coords_present (const int *coords HB_UNUSED, unsigned int num_coords) { return num_coords != 0; diff --git a/src/hb-utf.hh b/src/hb-utf.hh index b45bcd972..54ede3c16 100644 --- a/src/hb-utf.hh +++ b/src/hb-utf.hh @@ -365,7 +365,7 @@ struct hb_latin1_t prev (const codepoint_t *text, const codepoint_t *start HB_UNUSED, hb_codepoint_t *unicode, - hb_codepoint_t replacement) + hb_codepoint_t replacement HB_UNUSED) { *unicode = *--text; return text;