Fix compile warnings (HB_GNUC_UNUSED)

This commit is contained in:
Behdad Esfahbod 2010-04-23 14:39:10 -04:00
parent 8dfdca599c
commit 1d720192b1
5 changed files with 51 additions and 25 deletions

View File

@ -594,7 +594,7 @@ hb_utf8_next (const uint8_t *text,
void
hb_buffer_add_utf8 (hb_buffer_t *buffer,
const char *text,
unsigned int text_length,
unsigned int text_length HB_GNUC_UNUSED,
unsigned int item_offset,
unsigned int item_length)
{
@ -628,7 +628,7 @@ hb_utf16_next (const uint16_t *text,
void
hb_buffer_add_utf16 (hb_buffer_t *buffer,
const uint16_t *text,
unsigned int text_length,
unsigned int text_length HB_GNUC_UNUSED,
unsigned int item_offset,
unsigned int item_length)
{
@ -640,7 +640,7 @@ hb_buffer_add_utf16 (hb_buffer_t *buffer,
void
hb_buffer_add_utf32 (hb_buffer_t *buffer,
const uint32_t *text,
unsigned int text_length,
unsigned int text_length HB_GNUC_UNUSED,
unsigned int item_offset,
unsigned int item_length)
{

View File

@ -40,24 +40,37 @@
*/
static hb_codepoint_t
hb_font_get_glyph_nil (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_codepoint_t unicode, hb_codepoint_t variation_selector)
hb_font_get_glyph_nil (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data HB_GNUC_UNUSED,
hb_codepoint_t unicode HB_GNUC_UNUSED,
hb_codepoint_t variation_selector HB_GNUC_UNUSED)
{ return 0; }
static hb_bool_t
hb_font_get_contour_point_nil (hb_font_t *font, hb_face_t *face, const void *user_data,
unsigned int point_index,
hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
hb_font_get_contour_point_nil (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data HB_GNUC_UNUSED,
unsigned int point_index HB_GNUC_UNUSED,
hb_codepoint_t glyph HB_GNUC_UNUSED,
hb_position_t *x HB_GNUC_UNUSED,
hb_position_t *y HB_GNUC_UNUSED)
{ return false; }
static void
hb_font_get_glyph_metrics_nil (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_codepoint_t glyph, hb_glyph_metrics_t *metrics)
hb_font_get_glyph_metrics_nil (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data HB_GNUC_UNUSED,
hb_codepoint_t glyph HB_GNUC_UNUSED,
hb_glyph_metrics_t *metrics)
{ memset (metrics, 0, sizeof (*metrics)); }
static hb_position_t
hb_font_get_kerning_nil (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph)
hb_font_get_kerning_nil (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data HB_GNUC_UNUSED,
hb_codepoint_t first_glyph HB_GNUC_UNUSED,
hb_codepoint_t second_glyph HB_GNUC_UNUSED)
{ return 0; }
hb_font_funcs_t _hb_font_funcs_nil = {

View File

@ -34,8 +34,11 @@
#include FT_TRUETYPE_TABLES_H
static hb_codepoint_t
hb_ft_get_glyph (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_codepoint_t unicode, hb_codepoint_t variation_selector)
hb_ft_get_glyph (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data,
hb_codepoint_t unicode,
hb_codepoint_t variation_selector)
{
FT_Face ft_face = (FT_Face) user_data;
@ -51,9 +54,13 @@ hb_ft_get_glyph (hb_font_t *font, hb_face_t *face, const void *user_data,
}
static hb_bool_t
hb_ft_get_contour_point (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_ft_get_contour_point (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data,
unsigned int point_index,
hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
hb_codepoint_t glyph,
hb_position_t *x,
hb_position_t *y)
{
FT_Face ft_face = (FT_Face) user_data;
int load_flags = FT_LOAD_DEFAULT;
@ -76,8 +83,11 @@ hb_ft_get_contour_point (hb_font_t *font, hb_face_t *face, const void *user_data
}
static void
hb_ft_get_glyph_metrics (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_codepoint_t glyph, hb_glyph_metrics_t *metrics)
hb_ft_get_glyph_metrics (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data,
hb_codepoint_t glyph,
hb_glyph_metrics_t *metrics)
{
FT_Face ft_face = (FT_Face) user_data;
int load_flags = FT_LOAD_DEFAULT;
@ -100,8 +110,11 @@ hb_ft_get_glyph_metrics (hb_font_t *font, hb_face_t *face, const void *user_data
}
static hb_position_t
hb_ft_get_kerning (hb_font_t *font, hb_face_t *face, const void *user_data,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph)
hb_ft_get_kerning (hb_font_t *font HB_GNUC_UNUSED,
hb_face_t *face HB_GNUC_UNUSED,
const void *user_data,
hb_codepoint_t first_glyph,
hb_codepoint_t second_glyph)
{
FT_Face ft_face = (FT_Face) user_data;
FT_Vector kerning;

View File

@ -186,7 +186,7 @@ _hb_sanitize_init (hb_sanitize_context_t *context,
}
static HB_GNUC_UNUSED void
_hb_sanitize_fini (hb_sanitize_context_t *context,
_hb_sanitize_fini (hb_sanitize_context_t *context HB_GNUC_UNUSED,
hb_blob_t *blob)
{
#if HB_DEBUG_SANITIZE

View File

@ -33,10 +33,10 @@
*/
static hb_codepoint_t hb_unicode_get_mirroring_nil (hb_codepoint_t unicode) { return unicode; }
static hb_category_t hb_unicode_get_general_category_nil (hb_codepoint_t unicode) { return HB_CATEGORY_OTHER_LETTER; }
static hb_script_t hb_unicode_get_script_nil (hb_codepoint_t unicode) { return HB_SCRIPT_UNKNOWN; }
static unsigned int hb_unicode_get_combining_class_nil (hb_codepoint_t unicode) { return 0; }
static unsigned int hb_unicode_get_eastasian_width_nil (hb_codepoint_t unicode) { return 1; }
static hb_category_t hb_unicode_get_general_category_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return HB_CATEGORY_OTHER_LETTER; }
static hb_script_t hb_unicode_get_script_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return HB_SCRIPT_UNKNOWN; }
static unsigned int hb_unicode_get_combining_class_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return 0; }
static unsigned int hb_unicode_get_eastasian_width_nil (hb_codepoint_t unicode HB_GNUC_UNUSED) { return 1; }
hb_unicode_funcs_t _hb_unicode_funcs_nil = {
HB_REFERENCE_COUNT_INVALID, /* ref_count */