diff --git a/test/api/hb-test.h b/test/api/hb-test.h index 307845f62..39d091b60 100644 --- a/test/api/hb-test.h +++ b/test/api/hb-test.h @@ -42,6 +42,7 @@ HB_BEGIN_DECLS /* Just in case */ #undef G_DISABLE_ASSERT +#define HB_UNUSED G_GNUC_UNUSED /* Misc */ diff --git a/test/api/test-blob.c b/test/api/test-blob.c index d566f4e9d..7914a26ce 100644 --- a/test/api/test-blob.c +++ b/test/api/test-blob.c @@ -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); diff --git a/test/api/test-c.c b/test/api/test-c.c index 4b43b8379..78d6e974d 100644 --- a/test/api/test-c.c +++ b/test/api/test-c.c @@ -58,7 +58,7 @@ #endif int -main (int argc, char **argv) +main (void) { return !*hb_shape_list_shapers (); } diff --git a/test/api/test-font.c b/test/api/test-font.c index 4a2393ec6..4cd8dd8bf 100644 --- a/test/api/test-font.c +++ b/test/api/test-font.c @@ -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; diff --git a/test/api/test-multithread.c b/test/api/test-multithread.c index b9efca9bf..de288b6a4 100644 --- a/test/api/test-multithread.c +++ b/test/api/test-multithread.c @@ -101,7 +101,7 @@ thread_func (void *data) return 0; } -void +static void test_body (void) { int i; diff --git a/test/api/test-ot-color.c b/test/api/test-ot-color.c index 22584d20e..254f01556 100644 --- a/test/api/test-ot-color.c +++ b/test/api/test-ot-color.c @@ -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) { diff --git a/test/api/test-shape.c b/test/api/test-shape.c index 6232e7382..2a0024d04 100644 --- a/test/api/test-shape.c +++ b/test/api/test-shape.c @@ -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; diff --git a/test/api/test-unicode.c b/test/api/test-unicode.c index 88f12e779..4238ca992 100644 --- a/test/api/test-unicode.c +++ b/test/api/test-unicode.c @@ -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;