diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-26 07:35:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-26 07:35:23 +0000 |
commit | 3c6ad720d7a3be6901f747c46a5700b9380c5993 (patch) | |
tree | 26d55a367cbbc4dfabb18bd809fe6b167a9f408f /src/vpn | |
parent | 8615a73413015aea685349fde2b59b1d26df20a5 (diff) | |
download | gnunet-3c6ad720d7a3be6901f747c46a5700b9380c5993.tar.gz gnunet-3c6ad720d7a3be6901f747c46a5700b9380c5993.zip |
fix compiler warnings
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-daemon-vpn-helper.c | 8 | ||||
-rw-r--r-- | src/vpn/gnunet-helper-vpn.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index 4333cfb11..84f1105f6 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c | |||
@@ -277,6 +277,8 @@ helper_write (void *cls | |||
277 | memcpy (&pkt->udp_dns.data, ans->pkt.data, data_len); | 277 | memcpy (&pkt->udp_dns.data, ans->pkt.data, data_len); |
278 | buf = pkt; | 278 | buf = pkt; |
279 | } | 279 | } |
280 | else | ||
281 | GNUNET_assert (0); | ||
280 | 282 | ||
281 | GNUNET_CONTAINER_DLL_remove (answer_proc_head, answer_proc_tail, ans); | 283 | GNUNET_CONTAINER_DLL_remove (answer_proc_head, answer_proc_tail, ans); |
282 | GNUNET_free (ans); | 284 | GNUNET_free (ans); |
@@ -318,6 +320,7 @@ message_token (void *cls __attribute__ ((unused)), void *client | |||
318 | struct ip6_udp *pkt6_udp; | 320 | struct ip6_udp *pkt6_udp; |
319 | struct ip6_icmp *pkt6_icmp; | 321 | struct ip6_icmp *pkt6_icmp; |
320 | 322 | ||
323 | pkt6_udp = NULL; /* make compiler happy */ | ||
321 | switch (pkt6->ip6_hdr.nxthdr) | 324 | switch (pkt6->ip6_hdr.nxthdr) |
322 | { | 325 | { |
323 | case IPPROTO_UDP: | 326 | case IPPROTO_UDP: |
@@ -347,7 +350,8 @@ message_token (void *cls __attribute__ ((unused)), void *client | |||
347 | GNUNET_TIME_UNIT_FOREVER_REL, | 350 | GNUNET_TIME_UNIT_FOREVER_REL, |
348 | GNUNET_YES, &send_query, NULL); | 351 | GNUNET_YES, &send_query, NULL); |
349 | break; | 352 | break; |
350 | } | 353 | } |
354 | /* fall through */ | ||
351 | case IPPROTO_TCP: | 355 | case IPPROTO_TCP: |
352 | pkt6_tcp = (struct ip6_tcp *) pkt6; | 356 | pkt6_tcp = (struct ip6_tcp *) pkt6; |
353 | 357 | ||
@@ -436,7 +440,7 @@ message_token (void *cls __attribute__ ((unused)), void *client | |||
436 | memcpy (s->addr, me->addr, me->addrlen); | 440 | memcpy (s->addr, me->addr, me->addrlen); |
437 | s->proto = pkt6->ip6_hdr.nxthdr; | 441 | s->proto = pkt6->ip6_hdr.nxthdr; |
438 | if (s->proto == IPPROTO_UDP) | 442 | if (s->proto == IPPROTO_UDP) |
439 | { | 443 | { |
440 | hdr->type = htons (GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP); | 444 | hdr->type = htons (GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP); |
441 | memcpy (hc + 1, &pkt6_udp->udp_hdr, ntohs (pkt6_udp->udp_hdr.len)); | 445 | memcpy (hc + 1, &pkt6_udp->udp_hdr, ntohs (pkt6_udp->udp_hdr.len)); |
442 | app_type = GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY; | 446 | app_type = GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY; |
diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c index ed97770cf..c846c48ff 100644 --- a/src/vpn/gnunet-helper-vpn.c +++ b/src/vpn/gnunet-helper-vpn.c | |||
@@ -304,7 +304,7 @@ run (int fd_tun) | |||
304 | */ | 304 | */ |
305 | unsigned char buftun[MAX_SIZE]; | 305 | unsigned char buftun[MAX_SIZE]; |
306 | ssize_t buftun_size = 0; | 306 | ssize_t buftun_size = 0; |
307 | unsigned char *buftun_read; | 307 | unsigned char *buftun_read = NULL; |
308 | 308 | ||
309 | /* | 309 | /* |
310 | * The buffer filled by reading from stdin | 310 | * The buffer filled by reading from stdin |