Enable GNU GCC type checking of format arguments for our functions
This commit is contained in:
@ -35,7 +35,14 @@ typedef struct {
|
||||
* \return the new error message list head
|
||||
*/
|
||||
|
||||
void ErrPutMsg(ErrList *list, char *fmt, ...);
|
||||
#if __GNUC__ > 2
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
|
||||
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
||||
#else
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx )
|
||||
#endif
|
||||
void ErrPutMsg(ErrList *list, char *fmt, ...) G_GNUC_PRINTF (2, 3);
|
||||
#undef G_GNUC_PRINTF
|
||||
|
||||
/** \brief Get the most recent error message
|
||||
* \param list the error list
|
||||
|
Reference in New Issue
Block a user