[dovecot-cvs] dovecot/src/lib failures.c,1.29,1.30

tss at dovecot.org tss at dovecot.org
Sat Nov 18 14:04:19 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv25664

Modified Files:
	failures.c 
Log Message:
Added some __attr_format__ attributes to functions.



Index: failures.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/failures.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- failures.c	1 Nov 2006 18:47:37 -0000	1.29
+++ failures.c	18 Nov 2006 14:04:17 -0000	1.30
@@ -63,8 +63,8 @@
 	}
 }
 
-static int default_handler(const char *prefix, FILE *f,
-			   const char *format, va_list args)
+static int __attr_format__(3, 0)
+default_handler(const char *prefix, FILE *f, const char *format, va_list args)
 {
 	static int recursed = 0;
 	va_list args2;
@@ -117,13 +117,15 @@
 	return 0;
 }
 
-static void default_panic_handler(const char *format, va_list args)
+static void __attr_format__(1, 0)
+default_panic_handler(const char *format, va_list args)
 {
 	(void)default_handler("Panic: ", log_fd, format, args);
 	abort();
 }
 
-static void default_fatal_handler(int status, const char *format, va_list args)
+static void __attr_format__(2, 0)
+default_fatal_handler(int status, const char *format, va_list args)
 {
 	if (default_handler("Fatal: ", log_fd, format, args) < 0 &&
 	    status == FATAL_DEFAULT)
@@ -135,7 +137,8 @@
 	exit(status);
 }
 
-static void default_error_handler(const char *format, va_list args)
+static void __attr_format__(1, 0)
+default_error_handler(const char *format, va_list args)
 {
 	int old_errno = errno;
 
@@ -148,7 +151,8 @@
 	errno = old_errno;
 }
 
-static void default_warning_handler(const char *format, va_list args)
+static void __attr_format__(1, 0)
+default_warning_handler(const char *format, va_list args)
 {
 	int old_errno = errno;
 
@@ -160,7 +164,8 @@
 	errno = old_errno;
 }
 
-static void default_info_handler(const char *format, va_list args)
+static void __attr_format__(1, 0)
+default_info_handler(const char *format, va_list args)
 {
 	int old_errno = errno;
 
@@ -261,7 +266,8 @@
         info_handler = callback;
 }
 
-static int syslog_handler(int level, const char *format, va_list args)
+static int __attr_format__(2, 0)
+syslog_handler(int level, const char *format, va_list args)
 {
 	va_list args2;
 
@@ -357,7 +363,8 @@
 	i_set_warning_handler(NULL);
 }
 
-static int internal_handler(char log_type, const char *format, va_list args)
+static int __attr_format__(2, 0)
+internal_handler(char log_type, const char *format, va_list args)
 {
 	string_t *str;
 	int ret;
@@ -374,35 +381,36 @@
 	return ret;
 }
 
-static void i_internal_panic_handler(const char *fmt, va_list args)
-	__attr_noreturn__;
-static void i_internal_panic_handler(const char *fmt, va_list args)
+static void __attr_noreturn__ __attr_format__(1, 0)
+i_internal_panic_handler(const char *fmt, va_list args)
 {
 	(void)internal_handler('F', fmt, args);
         abort();
 }
 
-static void i_internal_fatal_handler(int status, const char *fmt, va_list args)
-	__attr_noreturn__;
-static void i_internal_fatal_handler(int status, const char *fmt, va_list args)
+static void __attr_noreturn__ __attr_format__(2, 0)
+i_internal_fatal_handler(int status, const char *fmt, va_list args)
 {
 	if (internal_handler('F', fmt, args) < 0 && status == FATAL_DEFAULT)
 		status = FATAL_LOGERROR;
 	exit(status);
 }
 
-static void i_internal_error_handler(const char *fmt, va_list args)
+static void __attr_format__(1, 0)
+i_internal_error_handler(const char *fmt, va_list args)
 {
 	if (internal_handler('E', fmt, args) < 0)
 		exit(FATAL_LOGERROR);
 }
 
-static void i_internal_warning_handler(const char *fmt, va_list args)
+static void __attr_format__(1, 0)
+i_internal_warning_handler(const char *fmt, va_list args)
 {
 	(void)internal_handler('W', fmt, args);
 }
 
-static void i_internal_info_handler(const char *fmt, va_list args)
+static void __attr_format__(1, 0)
+i_internal_info_handler(const char *fmt, va_list args)
 {
 	(void)internal_handler('I', fmt, args);
 }



More information about the dovecot-cvs mailing list