X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=libsigrokdecode-internal.h;h=d32414a85d0b282391632bde3980336fc888e955;hp=608440978cac41f955530529e7a0c0042c72833d;hb=943f9176255c63924fcf55c6ba8bad05e91d4923;hpb=41d43a33fb4088889aba931cbdbc032263a6f397 diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h index 6084409..d32414a 100644 --- a/libsigrokdecode-internal.h +++ b/libsigrokdecode-internal.h @@ -104,6 +104,15 @@ SRD_PRIV int py_strseq_to_char(PyObject *py_strseq, char ***out_strv); SRD_PRIV GVariant *py_obj_to_variant(PyObject *py_obj); /* exception.c */ -SRD_PRIV void srd_exception_catch(const char *format, ...); +#if defined(G_OS_WIN32) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +/* + * On MinGW, we need to specify the gnu_printf format flavor or GCC + * will assume non-standard Microsoft printf syntax. + */ +SRD_PRIV void srd_exception_catch(const char *format, ...) + __attribute__((__format__ (__gnu_printf__, 1, 2))); +#else +SRD_PRIV void srd_exception_catch(const char *format, ...) G_GNUC_PRINTF(1, 2); +#endif #endif