public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 daemons/dmeventd/dmeventd.c libdm/libdm-c ...
@ 2011-03-29 21:53 zkabelac
  0 siblings, 0 replies; only message in thread
From: zkabelac @ 2011-03-29 21:53 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-03-29 21:53:47

Modified files:
	daemons/dmeventd: dmeventd.c 
	libdm          : libdm-common.c 

Log message:
	Add attribute printf
	
	gcc suggested to add these attributes to instrumentat
	printf arguments. Adding it for internal functions as well.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.78&r2=1.79
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.114&r2=1.115

--- LVM2/daemons/dmeventd/dmeventd.c	2011/03/29 20:30:06	1.78
+++ LVM2/daemons/dmeventd/dmeventd.c	2011/03/29 21:53:46	1.79
@@ -567,6 +567,7 @@
 	pthread_mutex_unlock(&_timeout_mutex);
 }
 
+__attribute__((format(printf, 4, 5)))
 static void _no_intr_log(int level, const char *file, int line,
 			const char *f, ...)
 {
--- LVM2/libdm/libdm-common.c	2011/03/18 13:21:02	1.114
+++ LVM2/libdm/libdm-common.c	2011/03/29 21:53:47	1.115
@@ -78,6 +78,7 @@
  * function.
  */
 
+__attribute__((format(printf, 5, 0)))
 static void _default_log_line(int level,
 	    const char *file __attribute__((unused)),
 	    int line __attribute__((unused)), int dm_errno, 
@@ -101,6 +102,7 @@
 		fprintf(use_stderr ? stderr : stdout, "\n");
 }
 
+__attribute__((format(printf, 5, 6)))
 static void _default_log_with_errno(int level,
 	    const char *file __attribute__((unused)),
 	    int line __attribute__((unused)), int dm_errno, 
@@ -113,6 +115,7 @@
 	va_end(ap);
 }
 
+__attribute__((format(printf, 4, 5)))
 static void _default_log(int level, const char *file,
 			 int line, const char *f, ...)
 {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-29 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-29 21:53 LVM2 daemons/dmeventd/dmeventd.c libdm/libdm-c zkabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).