common: fix unused variable warning

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 <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Brad King 2016-09-29 14:57:01 -04:00 committed by cjihrig
parent cded27b663
commit 0d586b7dd8

View File

@ -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;