# HG changeset patch # User Matt Johnston # Date 1424447039 -28800 # Node ID 107b013e9d9d6df938147fbb43f564b7a51f2e6c # Parent ca71904cf3ee9859f837fca9dd84053db4ff5f3f avoid some warnings diff -r ca71904cf3ee -r 107b013e9d9d netio.c --- a/netio.c Fri Feb 20 23:38:05 2015 +0800 +++ b/netio.c Fri Feb 20 23:43:59 2015 +0800 @@ -274,7 +274,7 @@ struct iovec * packet_queue_to_iovec(struct Queue *queue, int *ret_iov_count) { struct iovec *iov = NULL; struct Link *l; - unsigned int i, packet_type; + unsigned int i; int len; buffer *writebuf; @@ -288,10 +288,9 @@ for (l = queue->head, i = 0; l; l = l->link, i++) { writebuf = (buffer*)l->item; - packet_type = writebuf->data[writebuf->len-1]; len = writebuf->len - 1 - writebuf->pos; dropbear_assert(len > 0); - TRACE2(("write_packet writev #%d type %d len %d/%d", i, packet_type, + TRACE2(("write_packet writev #%d type %d len %d/%d", i, writebuf->data[writebuf->len-1], len, writebuf->len-1)) iov[i].iov_base = buf_getptr(writebuf, len); iov[i].iov_len = len; @@ -338,7 +337,14 @@ void set_sock_priority(int sock, enum dropbear_prio prio) { - int iptos_val = 0, so_prio_val = 0, rc; + int rc; +#ifdef IPTOS_LOWDELAY + int iptos_val = 0; +#endif +#ifdef SO_PRIORITY + int so_prio_val = 0; +#endif + /* Don't log ENOTSOCK errors so that this can harmlessly be called * on a client '-J' proxy pipe */