mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 19:50:12 +01:00
Mark debug_print with __attribute__ ((format(__printf__, 1, 0)))
the drmServerInfo member, debug_print, takes a printf format string and varargs list. Tell the compiler about it. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
8279c8fb49
commit
cb4bc8ead6
1 changed files with 7 additions and 1 deletions
|
|
@ -92,8 +92,14 @@ extern "C" {
|
||||||
typedef unsigned int drmSize, *drmSizePtr; /**< For mapped regions */
|
typedef unsigned int drmSize, *drmSizePtr; /**< For mapped regions */
|
||||||
typedef void *drmAddress, **drmAddressPtr; /**< For mapped regions */
|
typedef void *drmAddress, **drmAddressPtr; /**< For mapped regions */
|
||||||
|
|
||||||
|
#if (__GNUC__ >= 3)
|
||||||
|
#define DRM_PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
|
||||||
|
#else
|
||||||
|
#define DRM_PRINTFLIKE(f, a)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _drmServerInfo {
|
typedef struct _drmServerInfo {
|
||||||
int (*debug_print)(const char *format, va_list ap);
|
int (*debug_print)(const char *format, va_list ap) DRM_PRINTFLIKE(1,0);
|
||||||
int (*load_module)(const char *name);
|
int (*load_module)(const char *name);
|
||||||
void (*get_perms)(gid_t *, mode_t *);
|
void (*get_perms)(gid_t *, mode_t *);
|
||||||
} drmServerInfo, *drmServerInfoPtr;
|
} drmServerInfo, *drmServerInfoPtr;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue