From 881e1054bc66fd07489d661dd5c3f84a5d077edc Mon Sep 17 00:00:00 2001 From: Simon Tooke Date: Tue, 30 Oct 2018 14:16:23 -0400 Subject: [PATCH] fix various GCC function pointer warnings --- src/hb-debug.hh | 6 +++--- src/hb-set.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-debug.hh b/src/hb-debug.hh index 58c190d27..d218e4328 100644 --- a/src/hb-debug.hh +++ b/src/hb-debug.hh @@ -173,7 +173,7 @@ _hb_debug_msg_va (const char *what, fprintf (stderr, "\n"); } -template <> inline void +template <> inline void HB_PRINTF_FUNC(7, 0) _hb_debug_msg_va<0> (const char *what HB_UNUSED, const void *obj HB_UNUSED, const char *func HB_UNUSED, @@ -192,7 +192,7 @@ _hb_debug_msg (const char *what, int level_dir, const char *message, ...) HB_PRINTF_FUNC(7, 8); -template static inline void +template static inline void HB_PRINTF_FUNC(7, 8) _hb_debug_msg (const char *what, const void *obj, const char *func, @@ -216,7 +216,7 @@ _hb_debug_msg<0> (const char *what HB_UNUSED, int level_dir HB_UNUSED, const char *message HB_UNUSED, ...) HB_PRINTF_FUNC(7, 8); -template <> inline void +template <> inline void HB_PRINTF_FUNC(7, 8) _hb_debug_msg<0> (const char *what HB_UNUSED, const void *obj HB_UNUSED, const char *func HB_UNUSED, diff --git a/src/hb-set.hh b/src/hb-set.hh index 0755498ba..2dfcc242a 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -53,8 +53,8 @@ struct hb_set_t struct page_t { - inline void init0 (void) { memset (&v, 0, sizeof (v)); } - inline void init1 (void) { memset (&v, 0xff, sizeof (v)); } + inline void init0 (void) { memset (reinterpret_cast(&v), 0, sizeof (v)); } + inline void init1 (void) { memset (reinterpret_cast(&v), 0xff, sizeof (v)); } inline unsigned int len (void) const { return ARRAY_LENGTH_CONST (v); }