Fix xbps_dbg_printf arguments by using __attribute__((format, printf)).

Patch provided by Michael Ghering in #148.

Close #148
This commit is contained in:
Juan RP
2016-02-06 09:13:38 +01:00
parent 067687ce28
commit 42994ada07
4 changed files with 12 additions and 11 deletions

View File

@@ -634,10 +634,10 @@ struct xbps_handle {
int flags;
};
void xbps_dbg_printf(struct xbps_handle *, const char *, ...);
void xbps_dbg_printf_append(struct xbps_handle *, const char *, ...);
void xbps_error_printf(const char *, ...);
void xbps_warn_printf(const char *, ...);
void xbps_dbg_printf(struct xbps_handle *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
void xbps_dbg_printf_append(struct xbps_handle *, const char *, ...)__attribute__ ((format (printf, 2, 3)));
void xbps_error_printf(const char *, ...)__attribute__ ((format (printf, 1, 2)));
void xbps_warn_printf(const char *, ...)__attribute__ ((format (printf, 1, 2)));
/**
* Initialize the XBPS library with the following steps: