Fix more compiler warnings

This commit is contained in:
Behdad Esfahbod 2017-11-14 14:40:21 -08:00
parent 7fdf16b2ce
commit fcd6c338ff
1 changed files with 7 additions and 5 deletions

View File

@ -221,12 +221,14 @@ template <>
template <int max_level, typename ret_t>
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<HB_DEBUG_CLOSURE, hb_void_t> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"")
" ")
#else
#define TRACE_CLOSURE(this) hb_no_trace_t<hb_void_t> trace HB_UNUSED
#endif
@ -355,7 +357,7 @@ struct hb_no_trace_t {
#define TRACE_COLLECT_GLYPHS(this) \
hb_auto_trace_t<HB_DEBUG_COLLECT_GLYPHS, hb_void_t> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"")
" ")
#else
#define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t<hb_void_t> trace HB_UNUSED
#endif
@ -367,7 +369,7 @@ struct hb_no_trace_t {
#define TRACE_SANITIZE(this) \
hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
"");
" ");
#else
#define TRACE_SANITIZE(this) hb_no_trace_t<bool> trace
#endif
@ -379,7 +381,7 @@ struct hb_no_trace_t {
#define TRACE_SERIALIZE(this) \
hb_auto_trace_t<HB_DEBUG_SERIALIZE, bool> trace \
(&c->debug_depth, "SERIALIZE", c, HB_FUNC, \
"");
" ");
#else
#define TRACE_SERIALIZE(this) hb_no_trace_t<bool> trace
#endif