summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-04 00:34:42 +0000
committerStef Walter <stef@memberwebs.com>2004-09-04 00:34:42 +0000
commitaae95bcac83dd2f1a5e258896ba24db1d626ccf1 (patch)
treef6edf5df7d05c7761bd784e0b3dd2fb3f07d3ab8 /src
parent2c1e356c9434b4419274496907413ad5186abebd (diff)
Supress needless warnings
Diffstat (limited to 'src')
-rw-r--r--src/clamsmtpd.h2
-rw-r--r--src/clio.c4
-rw-r--r--src/sock_any.c4
-rw-r--r--src/sock_any.h4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/clamsmtpd.h b/src/clamsmtpd.h
index 0accbdc..10b4a1f 100644
--- a/src/clamsmtpd.h
+++ b/src/clamsmtpd.h
@@ -93,7 +93,7 @@ clamsmtp_context_t;
#define clio_valid(io) ((io)->fd != -1)
void clio_init(clio_t* io, const char* name);
-int clio_connect(clamsmtp_context_t* ctx, clio_t* io, struct sockaddr_any* sany, const char* addrname);
+int clio_connect(clamsmtp_context_t* ctx, clio_t* io, const struct sockaddr_any* sany, const char* addrname);
void clio_disconnect(clamsmtp_context_t* ctx, clio_t* io);
int clio_select(clamsmtp_context_t* ctx, clio_t** io);
int clio_read_line(clamsmtp_context_t* ctx, clio_t* io, int trim);
diff --git a/src/clio.c b/src/clio.c
index dab1e5a..36b495e 100644
--- a/src/clio.c
+++ b/src/clio.c
@@ -105,7 +105,7 @@ void clio_init(clio_t* io, const char* name)
io->fd = -1;
}
-int clio_connect(clamsmtp_context_t* ctx, clio_t* io, struct sockaddr_any* sany,
+int clio_connect(clamsmtp_context_t* ctx, clio_t* io, const struct sockaddr_any* sany,
const char* addrname)
{
int ret = 0;
@@ -183,7 +183,7 @@ int clio_select(clamsmtp_context_t* ctx, clio_t** io)
/* Select on the above */
- switch(select(FD_SETSIZE, &mask, NULL, NULL, &(g_state->timeout)))
+ switch(select(FD_SETSIZE, &mask, NULL, NULL, (struct timeval*)&(g_state->timeout)))
{
case 0:
messagex(ctx, LOG_ERR, "network operation timed out");
diff --git a/src/sock_any.c b/src/sock_any.c
index e5f24c0..7535e02 100644
--- a/src/sock_any.c
+++ b/src/sock_any.c
@@ -302,7 +302,7 @@ int sock_any_pton(const char* addr, struct sockaddr_any* any, int opts)
return -1;
}
-int sock_any_ntop(struct sockaddr_any* any, char* addr, size_t addrlen, int opts)
+int sock_any_ntop(const struct sockaddr_any* any, char* addr, size_t addrlen, int opts)
{
int len = 0;
int port = 0;
@@ -354,7 +354,7 @@ int sock_any_ntop(struct sockaddr_any* any, char* addr, size_t addrlen, int opts
return 0;
}
-int sock_any_cmp(struct sockaddr_any* a1, struct sockaddr_any* a2, int opts)
+int sock_any_cmp(const struct sockaddr_any* a1, const struct sockaddr_any* a2, int opts)
{
if(a1->s.a.sa_family != a2->s.a.sa_family)
return -1;
diff --git a/src/sock_any.h b/src/sock_any.h
index 9fcb128..31cb13b 100644
--- a/src/sock_any.h
+++ b/src/sock_any.h
@@ -80,11 +80,11 @@ int sock_any_pton(const char* addr, struct sockaddr_any* any, int opts);
#define SANY_OPT_DEFINET6 0x00200000
#endif
-int sock_any_ntop(struct sockaddr_any* any, char* addr, size_t addrlen, int opts);
+int sock_any_ntop(const struct sockaddr_any* any, char* addr, size_t addrlen, int opts);
/* Don't print or compare the port */
#define SANY_OPT_NOPORT 0x01000000
-int sock_any_cmp(struct sockaddr_any* a1, struct sockaddr_any* a2, int opts);
+int sock_any_cmp(const struct sockaddr_any* a1, const struct sockaddr_any* a2, int opts);
#endif /* __SOCK_ANY_H__ */