Resolve clang's used-but-marked-unused warnings

This commit is contained in:
Ebrahim Byagowi 2018-04-23 19:03:57 +04:30 committed by Behdad Esfahbod
parent eaf649450a
commit 24b8b9b227
15 changed files with 22 additions and 22 deletions

View File

@ -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<hb_void_t> trace HB_UNUSED
#define TRACE_CLOSURE(this) hb_no_trace_t<hb_void_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<hb_void_t> trace HB_UNUSED
#define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t<hb_void_t> trace
#endif
#ifndef HB_DEBUG_SANITIZE

View File

@ -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)

View File

@ -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,

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;
%%{

View File

@ -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;

View File

@ -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;
%%{

View File

@ -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;

View File

@ -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;
%%{

View File

@ -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;

View File

@ -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;
%%{

View File

@ -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;
}

View File

@ -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;