From b5bb13ec0380624c2e663a4e9b4b29fe574b3e05 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 20 Oct 2010 11:40:04 -0200 Subject: Bug#45288: pb2 returns a lot of compilation warnings Fix assorted compiler warnings. include/my_pthread.h: Like for pthread_cond_timedwait, the abstime is constant. mysys/my_gethwaddr.c: Instead of using a manual copy that introduce warnings due to type mismatch, copy the buffer using memcpy and use memcmp to check whether all bytes of the buffer are zeroed. mysys/thr_mutex.c: Like for pthread_cond_timedwait, the abstime is constant. unittest/mytap/tap.h: Introduce a ok() variant that does not take a format argument. Since ok() is tagged with a printf attribute, GCC complains if the fmt argument is NULL. --- mysys/thr_mutex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysys/thr_mutex.c') diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index 8f9928026ba..c7600b58c95 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -259,8 +259,8 @@ int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp, const char *file, int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, - struct timespec *abstime, - const char *file, uint line) + const struct timespec *abstime, + const char *file, uint line) { int error; pthread_mutex_lock(&mp->global); -- cgit v1.2.1