util: fix mingw format-extra-args warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#ifndef UTIL_MACROS_H
|
#ifndef UTIL_MACROS_H
|
||||||
#define UTIL_MACROS_H
|
#define UTIL_MACROS_H
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "c99_compat.h"
|
#include "c99_compat.h"
|
||||||
@@ -126,7 +127,11 @@ do { \
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FUNC_ATTRIBUTE_FORMAT
|
#ifdef HAVE_FUNC_ATTRIBUTE_FORMAT
|
||||||
#define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
|
#if defined (__MINGW_PRINTF_FORMAT)
|
||||||
|
# define PRINTFLIKE(f, a) __attribute__ ((format(__MINGW_PRINTF_FORMAT, f, a)))
|
||||||
|
#else
|
||||||
|
# define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define PRINTFLIKE(f, a)
|
#define PRINTFLIKE(f, a)
|
||||||
#endif
|
#endif
|
||||||
|
@@ -54,11 +54,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#define _util_printf_format(fmt, list) PRINTFLIKE(fmt, list)
|
||||||
#define _util_printf_format(fmt, list) __attribute__ ((format (printf, fmt, list)))
|
|
||||||
#else
|
|
||||||
#define _util_printf_format(fmt, list)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void _debug_vprintf(const char *format, va_list ap);
|
void _debug_vprintf(const char *format, va_list ap);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user