From: Guus Sliepen Date: Mon, 25 Jun 2012 17:01:51 +0000 (+0200) Subject: Fix compiler warnings. X-Git-Tag: release-1.0.19~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0a84f9cb8f52f2d2b4f03a5ad5ef9dfcd3509033;p=oweals%2Ftinc.git Fix compiler warnings. --- diff --git a/src/linux/device.c b/src/linux/device.c index cbf2152..5ae8947 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -210,7 +210,7 @@ static bool write_packet(vpn_packet_t *packet) { } break; case DEVICE_TYPE_ETHERTAP: - *(short int *)(packet->data - 2) = packet->len; + memcpy(packet->data - 2, &packet->len, 2); if(write(device_fd, packet->data - 2, packet->len + 2) < 0) { logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, diff --git a/src/net_socket.c b/src/net_socket.c index f49832f..2d1ecc5 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -352,7 +352,7 @@ static void do_outgoing_pipe(connection_t *c, char *command) { void do_outgoing_connection(connection_t *c) { char *address, *port, *space; - struct addrinfo *proxyai; + struct addrinfo *proxyai = NULL; int result; if(!c->outgoing) {