+2006-10-21 Bruno Haible <bruno@clisp.org>
+
+ * gettext-po.h.in (struct po_error_handler): Add format attribute to
+ error, error_at_line fields.
+ * gettext-po.c (po_error_logger): Declare with format attribute.
+
2006-10-20 Bruno Haible <bruno@clisp.org>
* Makefile.am (config.h): Treat .lo files like .o files. Define
/* An error logger based on the po_error function pointer. */
static void
+po_error_logger (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+static void
po_error_logger (const char *format, ...)
{
va_list args;
Must increment the error_message_count variable declared in error.h.
Must not return if STATUS is nonzero. */
void (*error) (int status, int errnum,
- const char *format, ...);
+ const char *format, ...)
+#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
+ __attribute__ ((__format__ (__printf__, 3, 4)))
+#endif
+ ;
/* Signal an error. The error message is built from FORMAT and the following
arguments. The error location is at FILENAME line LINENO. ERRNUM, if
Must not return if STATUS is nonzero. */
void (*error_at_line) (int status, int errnum,
const char *filename, unsigned int lineno,
- const char *format, ...);
+ const char *format, ...)
+#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
+ __attribute__ ((__format__ (__printf__, 5, 6)))
+#endif
+ ;
/* Signal a multiline warning. The PREFIX applies to all lines of the
MESSAGE. Free the PREFIX and MESSAGE when done. */