From 26b025a9b0feea1b5167a135676f30f78d7d9ae1 Mon Sep 17 00:00:00 2001 From: frekky Date: Wed, 11 Nov 2015 20:24:13 +0800 Subject: [PATCH] Fix unused variable warning on default build --- src/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/window.c b/src/window.c index 36f4946..79d2b65 100644 --- a/src/window.c +++ b/src/window.c @@ -392,10 +392,11 @@ window_ack(struct frag_buffer *w, int seqid) void window_tick(struct frag_buffer *w) { - unsigned old_start_id; for (size_t i = 0; i < w->windowsize; i++) { if (w->frags[w->window_start].acks >= 1) { - old_start_id = w->start_seq_id; +#ifdef DEBUG_BUILD + unsigned old_start_id = w->start_seq_id; +#endif w->start_seq_id = (w->start_seq_id + 1) % MAX_SEQ_ID; WDEBUG("moving window forwards; %lu-%lu (%u) to %lu-%lu (%u) len=%lu", w->window_start, w->window_end, old_start_id, AFTER(w, 1),