[test] Fix -Wunused-parameter warnings
This commit is contained in:
parent
be0b2ed316
commit
dcfcb950b8
|
@ -42,6 +42,7 @@ HB_BEGIN_DECLS
|
|||
/* Just in case */
|
||||
#undef G_DISABLE_ASSERT
|
||||
|
||||
#define HB_UNUSED G_GNUC_UNUSED
|
||||
|
||||
/* Misc */
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ fixture_init (fixture_t *fixture, gconstpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
fixture_finish (fixture_t *fixture, gconstpointer user_data)
|
||||
fixture_finish (fixture_t *fixture, gconstpointer user_data HB_UNUSED)
|
||||
{
|
||||
hb_blob_destroy (fixture->blob);
|
||||
g_assert_cmpint (fixture->freed, ==, 1);
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
main (void)
|
||||
{
|
||||
return !*hb_shape_list_shapers ();
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ free_up (void *user_data)
|
|||
}
|
||||
|
||||
static hb_blob_t *
|
||||
get_table (hb_face_t *face, hb_tag_t tag, void *user_data)
|
||||
get_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data HB_UNUSED)
|
||||
{
|
||||
if (tag == HB_TAG ('a','b','c','d'))
|
||||
return hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
|
||||
|
@ -210,10 +210,10 @@ test_fontfuncs_nil (void)
|
|||
}
|
||||
|
||||
static hb_bool_t
|
||||
contour_point_func1 (hb_font_t *font, void *font_data,
|
||||
hb_codepoint_t glyph, unsigned int point_index,
|
||||
contour_point_func1 (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED,
|
||||
hb_codepoint_t glyph, unsigned int point_index HB_UNUSED,
|
||||
hb_position_t *x, hb_position_t *y,
|
||||
void *user_data)
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
if (glyph == 1) {
|
||||
*x = 2;
|
||||
|
@ -230,10 +230,10 @@ contour_point_func1 (hb_font_t *font, void *font_data,
|
|||
}
|
||||
|
||||
static hb_bool_t
|
||||
contour_point_func2 (hb_font_t *font, void *font_data,
|
||||
contour_point_func2 (hb_font_t *font, void *font_data HB_UNUSED,
|
||||
hb_codepoint_t glyph, unsigned int point_index,
|
||||
hb_position_t *x, hb_position_t *y,
|
||||
void *user_data)
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
if (glyph == 1) {
|
||||
*x = 6;
|
||||
|
@ -246,9 +246,9 @@ contour_point_func2 (hb_font_t *font, void *font_data,
|
|||
}
|
||||
|
||||
static hb_position_t
|
||||
glyph_h_advance_func1 (hb_font_t *font, void *font_data,
|
||||
glyph_h_advance_func1 (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED,
|
||||
hb_codepoint_t glyph,
|
||||
void *user_data)
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
if (glyph == 1)
|
||||
return 8;
|
||||
|
|
|
@ -101,7 +101,7 @@ thread_func (void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test_body (void)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -99,6 +99,7 @@ static hb_face_t *cpal_v0 = NULL;
|
|||
static hb_face_t *cpal_v1 = NULL;
|
||||
|
||||
|
||||
#if 0
|
||||
#define assert_color_rgba(colors, i, r, g, b, a) G_STMT_START { \
|
||||
const hb_ot_color_t *_colors = (colors); \
|
||||
const size_t _i = (i); \
|
||||
|
@ -122,7 +123,6 @@ static hb_face_t *cpal_v1 = NULL;
|
|||
} G_STMT_END
|
||||
|
||||
|
||||
#if 0
|
||||
static void
|
||||
test_hb_ot_color_get_palette_count (void)
|
||||
{
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
static const char test_data[] = "test\0data";
|
||||
|
||||
static hb_position_t
|
||||
glyph_h_advance_func (hb_font_t *font, void *font_data,
|
||||
glyph_h_advance_func (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED,
|
||||
hb_codepoint_t glyph,
|
||||
void *user_data)
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
switch (glyph) {
|
||||
case 1: return 10;
|
||||
|
@ -54,10 +54,10 @@ glyph_h_advance_func (hb_font_t *font, void *font_data,
|
|||
}
|
||||
|
||||
static hb_bool_t
|
||||
glyph_func (hb_font_t *font, void *font_data,
|
||||
hb_codepoint_t unicode, hb_codepoint_t variant_selector,
|
||||
glyph_func (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED,
|
||||
hb_codepoint_t unicode, hb_codepoint_t variation_selector HB_UNUSED,
|
||||
hb_codepoint_t *glyph,
|
||||
void *user_data)
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
switch (unicode) {
|
||||
case 'T': *glyph = 1; return TRUE;
|
||||
|
@ -68,9 +68,9 @@ glyph_func (hb_font_t *font, void *font_data,
|
|||
}
|
||||
|
||||
static hb_position_t
|
||||
glyph_h_kerning_func (hb_font_t *font, void *font_data,
|
||||
glyph_h_kerning_func (hb_font_t *font HB_UNUSED, void *font_data HB_UNUSED,
|
||||
hb_codepoint_t left, hb_codepoint_t right,
|
||||
void *user_data)
|
||||
void *user_data HB_UNUSED)
|
||||
{
|
||||
if (left == 1 && right == 2)
|
||||
return -2;
|
||||
|
|
|
@ -645,18 +645,18 @@ typedef struct {
|
|||
} data_fixture_t;
|
||||
|
||||
static void
|
||||
data_fixture_init (data_fixture_t *f, gconstpointer user_data)
|
||||
data_fixture_init (data_fixture_t *f, gconstpointer user_data HB_UNUSED)
|
||||
{
|
||||
f->data[0].value = MAGIC0;
|
||||
f->data[1].value = MAGIC1;
|
||||
}
|
||||
static void
|
||||
data_fixture_finish (data_fixture_t *f, gconstpointer user_data)
|
||||
data_fixture_finish (data_fixture_t *f HB_UNUSED, gconstpointer user_data HB_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
test_unicode_subclassing_nil (data_fixture_t *f, gconstpointer user_data)
|
||||
test_unicode_subclassing_nil (data_fixture_t *f, gconstpointer user_data HB_UNUSED)
|
||||
{
|
||||
hb_unicode_funcs_t *uf, *aa;
|
||||
|
||||
|
@ -678,7 +678,7 @@ test_unicode_subclassing_nil (data_fixture_t *f, gconstpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
test_unicode_subclassing_default (data_fixture_t *f, gconstpointer user_data)
|
||||
test_unicode_subclassing_default (data_fixture_t *f, gconstpointer user_data HB_UNUSED)
|
||||
{
|
||||
hb_unicode_funcs_t *uf, *aa;
|
||||
|
||||
|
@ -697,7 +697,7 @@ test_unicode_subclassing_default (data_fixture_t *f, gconstpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
test_unicode_subclassing_deep (data_fixture_t *f, gconstpointer user_data)
|
||||
test_unicode_subclassing_deep (data_fixture_t *f, gconstpointer user_data HB_UNUSED)
|
||||
{
|
||||
hb_unicode_funcs_t *uf, *aa;
|
||||
|
||||
|
|
Loading…
Reference in New Issue