summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-02-18 03:31:13 +0100
committerGravatar Nikias Bassen2013-02-18 03:31:13 +0100
commit7527650eaab1f1910f6bfa24061a0bddc7937b9f (patch)
tree2bc2c5b4e6b88af0cc465d91ca46b48b028a12bc
parentd7cf83b38c3edd77c6159bc3c62144b52fabe223 (diff)
downloadcsoap-7527650eaab1f1910f6bfa24061a0bddc7937b9f.tar.gz
csoap-7527650eaab1f1910f6bfa24061a0bddc7937b9f.tar.bz2
fixed several compiler warnings
-rwxr-xr-xexamples/nanohttp/mime_client.c1
-rw-r--r--libcsoap/soap-nudp.c4
-rw-r--r--nanohttp/nanohttp-admin.c4
-rwxr-xr-xnanohttp/nanohttp-response.c4
-rw-r--r--nanohttp/nanohttp-socket.c2
-rwxr-xr-xwsdl2c/wsdl2c.c3
6 files changed, 12 insertions, 6 deletions
diff --git a/examples/nanohttp/mime_client.c b/examples/nanohttp/mime_client.c
index b6fe8b0..7e09435 100755
--- a/examples/nanohttp/mime_client.c
+++ b/examples/nanohttp/mime_client.c
@@ -23,6 +23,7 @@
******************************************************************/
#include <stdio.h>
#include <errno.h>
+#include <string.h>
#include <nanohttp/nanohttp-client.h>
diff --git a/libcsoap/soap-nudp.c b/libcsoap/soap-nudp.c
index ddcf74c..35e0f66 100644
--- a/libcsoap/soap-nudp.c
+++ b/libcsoap/soap-nudp.c
@@ -99,7 +99,7 @@ int inet_pton(int af, const char *src, void *dst)
return -1;
}
- if (WSAStringToAddress(src, af, NULL, (struct sockaddr *) &sa, &srcsize) != 0)
+ if (WSAStringToAddress((LPSTR)src, af, NULL, (struct sockaddr *) &sa, &srcsize) != 0)
{
errno = WSAGetLastError();
return -1;
@@ -235,7 +235,7 @@ _soap_nudp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx *
return herror_new("soap_nudp_client_invoke", 0, "Destination address is missing");
}
- bzero(&addr, sizeof(struct sockaddr_in));
+ memset(&addr, '\0', sizeof(struct sockaddr_in));
addr.sin_family = AF_INET;
if (to->port == 0)
addr.sin_port = htons(NUDP_DEFAULT_PORT);
diff --git a/nanohttp/nanohttp-admin.c b/nanohttp/nanohttp-admin.c
index 91ad0f0..76b0e06 100644
--- a/nanohttp/nanohttp-admin.c
+++ b/nanohttp/nanohttp-admin.c
@@ -160,8 +160,8 @@ _httpd_admin_list_statistics(httpd_conn_t *conn, const char *service_name)
service->statistics->requests,
service->statistics->bytes_received,
service->statistics->bytes_transmitted,
- service->statistics->time.tv_sec,
- service->statistics->time.tv_usec);
+ (long int)service->statistics->time.tv_sec,
+ (long int)service->statistics->time.tv_usec);
pthread_rwlock_unlock(&(service->statistics->lock));
http_output_stream_write_string(conn->out, buffer);
diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c
index 54c05dc..d5592c6 100755
--- a/nanohttp/nanohttp-response.c
+++ b/nanohttp/nanohttp-response.c
@@ -46,6 +46,10 @@
#include <netinet/in.h>
#endif
+#ifndef strtok_r
+extern char* strtok_r(char*, const char*, char**);
+#endif
+
#include "nanohttp-logging.h"
#include "nanohttp-error.h"
#include "nanohttp-common.h"
diff --git a/nanohttp/nanohttp-socket.c b/nanohttp/nanohttp-socket.c
index b7ae905..0f4f2f4 100644
--- a/nanohttp/nanohttp-socket.c
+++ b/nanohttp/nanohttp-socket.c
@@ -301,7 +301,7 @@ hsocket_bind(struct hsocket_t *dsock, unsigned short port)
"Socket error (%s)", strerror(errno));
}
- setsockopt(sock.sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ setsockopt(sock.sock, SOL_SOCKET, SO_REUSEADDR, (const void*)&opt, sizeof(opt));
/* bind socket */
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
diff --git a/wsdl2c/wsdl2c.c b/wsdl2c/wsdl2c.c
index 23dac48..c6f4b34 100755
--- a/wsdl2c/wsdl2c.c
+++ b/wsdl2c/wsdl2c.c
@@ -30,6 +30,7 @@
#define _DESERIALIZER_DISABLE_
#include "CallList.h"
+#include "xsd2c/tr.h"
/* ------------- Just for test --------------------------------- */
@@ -422,7 +423,7 @@ void handlePortType(xmlDocPtr doc, const char *name)
/* handle input */
input = findSubNode(cur, "input");
if (input == NULL) {
- fprintf(stderr, "WARNING: No input for operation '%'\n", opname);
+ fprintf(stderr, "WARNING: No input for operation '%s'\n", opname);
cur = cur->next;
continue;
}