Fix compile warnings (HB_GNUC_UNUSED)
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 23 Apr 2010 18:39:10 +0000 (14:39 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Fri, 23 Apr 2010 18:39:10 +0000 (14:39 -0400)
src/hb-buffer.c
src/hb-font.cc
src/hb-ft.c
src/hb-open-type-private.hh
src/hb-unicode.c

index ac6b47d..777ee7f 100644 (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)
 {
index e1b0b87..9c33d97 100644 (file)
  */
 
 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 = {
index 18b6e0b..79e1084 100644 (file)
 #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;
index 6ec22f5..d7354be 100644 (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
index e155d6d..b6bd4ba 100644 (file)
  */
 
 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 */