aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-10-02 13:28:10 +0000
committerYang Tse <yangsita@gmail.com>2008-10-02 13:28:10 +0000
commit26a651f7aef8f51df4320f0adc0179896ee23b95 (patch)
tree3b5a66f0e402527d42d681a322b0afa4f1241bf4 /tests
parentb64f0dace3312ab8e5fb58b9390a8926f6b7ad36 (diff)
fix compiler warning: `variable' might be clobbered by `longjmp' or `vfork'
Diffstat (limited to 'tests')
-rw-r--r--tests/server/tftpd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index fc51b6eff..443eea970 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -760,9 +760,9 @@ static void timer(int signum)
*/
static void sendtftp(struct testcase *test, struct formats *pf)
{
- struct tftphdr *dp;
- struct tftphdr *ap; /* ack packet */
- unsigned short block = 1;
+ struct tftphdr * volatile dp;
+ struct tftphdr * volatile ap; /* ack packet */
+ volatile unsigned short block = 1;
int size;
ssize_t n;
#if defined(HAVE_ALARM) && defined(SIGALRM)
@@ -835,9 +835,9 @@ static void justtimeout(int signum)
*/
static void recvtftp(struct testcase *test, struct formats *pf)
{
- struct tftphdr *dp;
- struct tftphdr *ap; /* ack buffer */
- unsigned short block = 0;
+ struct tftphdr * volatile dp;
+ struct tftphdr * volatile ap; /* ack buffer */
+ volatile unsigned short block = 0;
ssize_t n, size;
#if defined(HAVE_ALARM) && defined(SIGALRM)
mysignal(SIGALRM, timer);