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:
parent
36089b2236
commit
6460d5a405
@ -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, ...)
|
||||
{
|
||||
|
@ -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, ...)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user