From 0a880f80ffa84cf21c8780df37bae2aa70037126 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 7 Sep 2004 03:44:32 +0000 Subject: - Fixed warnings --- common/stringx.c | 6 +++--- src/clamsmtpd.c | 2 +- src/util.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/stringx.c b/common/stringx.c index 96c631b..1067f27 100644 --- a/common/stringx.c +++ b/common/stringx.c @@ -244,12 +244,12 @@ void plock() #endif #ifdef _DEBUG - r = pthread_mutex_trylock(&(g_state->mutex)); + r = pthread_mutex_trylock((pthread_mutex_t*)&(g_state->mutex)); if(r == EBUSY) { wait = 1; message(NULL, LOG_DEBUG, "thread will block: %d", pthread_self()); - r = pthread_mutex_lock(&(g_state->mutex)); + r = pthread_mutex_lock((pthread_mutex_t*)&(g_state->mutex)); } #else @@ -273,7 +273,7 @@ void plock() void punlock() { - int r = pthread_mutex_unlock(&(g_state->mutex)); + int r = pthread_mutex_unlock((pthread_mutex_t*)&(g_state->mutex)); if(r != 0) { errno = r; diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index aef9e23..85b9a14 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -635,7 +635,7 @@ static int connect_out(clamsmtp_context_t* ctx) { struct sockaddr_any peeraddr; struct sockaddr_any addr; - struct sockaddr_any* outaddr; + const struct sockaddr_any* outaddr; char buf[MAXPATHLEN]; const char* outname; diff --git a/src/util.c b/src/util.c index 96c631b..1067f27 100644 --- a/src/util.c +++ b/src/util.c @@ -244,12 +244,12 @@ void plock() #endif #ifdef _DEBUG - r = pthread_mutex_trylock(&(g_state->mutex)); + r = pthread_mutex_trylock((pthread_mutex_t*)&(g_state->mutex)); if(r == EBUSY) { wait = 1; message(NULL, LOG_DEBUG, "thread will block: %d", pthread_self()); - r = pthread_mutex_lock(&(g_state->mutex)); + r = pthread_mutex_lock((pthread_mutex_t*)&(g_state->mutex)); } #else @@ -273,7 +273,7 @@ void plock() void punlock() { - int r = pthread_mutex_unlock(&(g_state->mutex)); + int r = pthread_mutex_unlock((pthread_mutex_t*)&(g_state->mutex)); if(r != 0) { errno = r; -- cgit v1.2.3