aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2009-04-08 18:37:11 +0000
committerGisle Vanem <gvanem@broadpark.no>2009-04-08 18:37:11 +0000
commit59997ecad538c7f55ce6a4518f61709160f3c868 (patch)
treeaffd7bf32a85cc65e4480a01ca9cad65b9496677
parent6e2f0833ad00a4421d60be1933bbda617a2139a0 (diff)
Avoid warnings when HAVE_ALRM and SIGALRM are not defined.
-rw-r--r--tests/server/tftpd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 364cddc3a..0e82f5ff3 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -116,7 +116,6 @@ static struct tftphdr *w_init(void);
static int readit(struct testcase *test, struct tftphdr **dpp, int convert);
static int writeit(struct testcase *test, struct tftphdr **dpp, int ct,
int convert);
-static void mysignal(int, void (*func)(int));
#define opcode_RRQ 1
#define opcode_WRQ 2
@@ -145,7 +144,6 @@ static void recvtftp(struct testcase *test, struct formats *pf);
static int validate_access(struct testcase *test, const char *, int);
static curl_socket_t peer;
-static int rexmtval = TIMEOUT;
static int maxtimeout = 5*TIMEOUT;
static char buf[PKTSIZE];
@@ -744,6 +742,9 @@ static int timeout;
static sigjmp_buf timeoutbuf;
#endif
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+static int rexmtval = TIMEOUT;
+
static void timer(int signum)
{
(void)signum;
@@ -760,6 +761,12 @@ static void timer(int signum)
#endif
}
+static void (int signum)
+{
+ (void)signum;
+}
+#endif /* HAVE_ALARM && SIGALRM */
+
static unsigned short sendblock;
static struct tftphdr *sdp;
static struct tftphdr *sap; /* ack packet */
@@ -830,11 +837,6 @@ static void sendtftp(struct testcase *test, struct formats *pf)
} while (size == SEGSIZE);
}
-static void justtimeout(int signum)
-{
- (void)signum;
-}
-
static unsigned short recvblock;
static struct tftphdr *rdp;