From fcd6c338ff4968a0d7fc297da1c6d8058823aaa1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 14 Nov 2017 14:40:21 -0800 Subject: [PATCH] Fix more compiler warnings --- src/hb-debug.hh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hb-debug.hh b/src/hb-debug.hh index ca8c638a7..03431cbf7 100644 --- a/src/hb-debug.hh +++ b/src/hb-debug.hh @@ -221,12 +221,14 @@ template <> template struct hb_auto_trace_t { + explicit inline hb_auto_trace_t (unsigned int *plevel_, const char *what_, const void *obj_, const char *func, const char *message, - ...) : plevel (plevel_), what (what_), obj (obj_), returned (false) + ...) HB_PRINTF_FUNC(6, 7) + : plevel (plevel_), what (what_), obj (obj_), returned (false) { if (plevel) ++*plevel; @@ -343,7 +345,7 @@ struct hb_no_trace_t { #define TRACE_CLOSURE(this) \ hb_auto_trace_t trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - "") + " ") #else #define TRACE_CLOSURE(this) hb_no_trace_t trace HB_UNUSED #endif @@ -355,7 +357,7 @@ struct hb_no_trace_t { #define TRACE_COLLECT_GLYPHS(this) \ hb_auto_trace_t trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - "") + " ") #else #define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t trace HB_UNUSED #endif @@ -367,7 +369,7 @@ struct hb_no_trace_t { #define TRACE_SANITIZE(this) \ hb_auto_trace_t trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - ""); + " "); #else #define TRACE_SANITIZE(this) hb_no_trace_t trace #endif @@ -379,7 +381,7 @@ struct hb_no_trace_t { #define TRACE_SERIALIZE(this) \ hb_auto_trace_t trace \ (&c->debug_depth, "SERIALIZE", c, HB_FUNC, \ - ""); + " "); #else #define TRACE_SERIALIZE(this) hb_no_trace_t trace #endif