From 0d586b7dd856f2088b477e58be5d481723fc105b Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 29 Sep 2016 14:57:01 -0400 Subject: [PATCH] common: fix unused variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The saved_data variable in uv_loop_close() is only used when NDEBUG is defined. This commit makes the variable declaration depend on NDEBUG as well. PR-URL: https://github.com/libuv/libuv/pull/1093 Reviewed-By: Colin Ihrig Reviewed-By: Saúl Ibarra Corretgé --- src/uv-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uv-common.c b/src/uv-common.c index 434a5029..46d95467 100644 --- a/src/uv-common.c +++ b/src/uv-common.c @@ -613,7 +613,9 @@ uv_loop_t* uv_loop_new(void) { int uv_loop_close(uv_loop_t* loop) { QUEUE* q; uv_handle_t* h; +#ifndef NDEBUG void* saved_data; +#endif if (!QUEUE_EMPTY(&(loop)->active_reqs)) return UV_EBUSY;