From 2822728f2af36d7599962d8e57d293cd1a5a2f69 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sat, 28 Aug 2021 14:08:25 +0930 Subject: Fix some MinGW warnings The FT change is because my MinGW build is using a more recent version of FT. Remove the disabled _cairo_win32_scaled_font_text_to_glyphs() code to fix the defined but not used warning. _cairo_win32_scaled_font_text_to_glyphs() was diabled in d9408041aa with the comment: "Currently disable the win32-font text_to_glyphs(), until that one is updated. Or better yet, remove it and implement ucs4_to_index(). It's the toy font API afterall." _cairo_win32_scaled_font_ucs4_to_index() was added in d1c619bc7d. --- util/cairo-script/csi-replay.c | 2 ++ util/cairo-trace/trace.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c index 4c66b7752..9d9be72c2 100644 --- a/util/cairo-script/csi-replay.c +++ b/util/cairo-script/csi-replay.c @@ -41,7 +41,9 @@ #include #include +#if defined(CAIRO_HAS_XLIB_SURFACE) || defined(CAIRO_HAS_XLIB_XRENDER_SURFACE) static const cairo_user_data_key_t _key; +#endif #define SINGLE_SURFACE 1 diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c index cc4b18c0d..bb79c85b9 100644 --- a/util/cairo-trace/trace.c +++ b/util/cairo-trace/trace.c @@ -99,8 +99,13 @@ #define CAIRO_BITSWAP8(c) ((((c) * 0x0802LU & 0x22110LU) | ((c) * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \ +#ifdef __MINGW32__ +#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \ + __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index))) +#else +#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \ __attribute__((__format__(__printf__, fmt_index, va_index))) +#endif #else #define CAIRO_PRINTF_FORMAT(fmt_index, va_index) #endif -- cgit v1.2.1