From 3ca0b9bb47f015c0de7379da46d10948e0637302 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 11 Jun 2009 17:46:33 +0000 Subject: fix compiler warning --- tests/server/sws.c | 5 +---- tests/server/tftpd.c | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/server') diff --git a/tests/server/sws.c b/tests/server/sws.c index dee1b9db6..99f188017 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -183,11 +183,8 @@ static const char *doc404 = "HTTP/1.1 404 Not Found\r\n" "The requested URL was not found on this server.\n" "


" SWSVERSION "
\n" "\n"; -#ifdef SIGPIPE +#if defined(SIGPIPE) && defined(HAVE_SIGNAL) static volatile int sigpipe; /* Why? It's not used */ -#endif - -#ifdef SIGPIPE static void sigpipe_handler(int sig) { (void)sig; /* prevent warning */ diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index afd7f4fdd..6014842b5 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -484,7 +484,7 @@ int main(int argc, char **argv) sock = socket(AF_INET6, SOCK_DGRAM, 0); #endif - if (sock < 0) { + if(CURL_SOCKET_BAD == sock) { perror("opening stream socket"); logmsg("Error opening socket"); return 1; @@ -543,7 +543,7 @@ int main(int argc, char **argv) from.sin_family = AF_INET; peer = socket(AF_INET, SOCK_DGRAM, 0); - if (peer < 0) { + if(CURL_SOCKET_BAD == peer) { logmsg("socket"); result = 2; break; -- cgit v1.2.3