From 858fef5c8fc0c1b4c237dc65499756c3664492d8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 31 Oct 2017 23:21:30 +0100 Subject: [*] Mark logadd() as printf-style function, fix errors that it revealed ...there were quite a few format string errors as it turns out :/ --- src/server/locks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/locks.c') diff --git a/src/server/locks.c b/src/server/locks.c index 3bd5103..71a1845 100644 --- a/src/server/locks.c +++ b/src/server/locks.c @@ -105,7 +105,7 @@ int debug_spin_lock(const char *name, const char *file, int line, pthread_spinlo } pthread_spin_unlock( &initdestory ); if ( t == NULL ) { - logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads at %s:%d\n", (void*)lock, name, file, line ); + logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads for lock %p (%s) at %s:%d\n", (void*)lock, name, file, line ); exit( 4 ); } const int retval = pthread_spin_lock( lock ); @@ -155,7 +155,7 @@ int debug_spin_trylock(const char *name, const char *file, int line, pthread_spi } pthread_spin_unlock( &initdestory ); if ( t == NULL ) { - logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads at %s:%d\n", (void*)lock, name, file, line ); + logadd( LOG_ERROR, "Lock sanity check: Too many waiting threads for %p (%s) at %s:%d\n", (void*)lock, name, file, line ); exit( 4 ); } const int retval = pthread_spin_trylock( lock ); -- cgit v1.2.3-55-g7522