1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Add attribute printf

gcc suggested to add these attributes to instrumentat
printf arguments. Adding it for internal functions as well.
This commit is contained in:
Zdenek Kabelac 2011-03-29 21:53:46 +00:00
parent 36089b2236
commit 6460d5a405
2 changed files with 4 additions and 0 deletions

View File

@ -567,6 +567,7 @@ static void _unregister_for_timeout(struct thread_status *thread)
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, ...)
{

View File

@ -78,6 +78,7 @@ static int _udev_checking = 1;
* 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 @@ static void _default_log_line(int level,
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 @@ static void _default_log_with_errno(int level,
va_end(ap);
}
__attribute__((format(printf, 4, 5)))
static void _default_log(int level, const char *file,
int line, const char *f, ...)
{