From bae1e05fc8442edbdaa947c44f07c5baa7515ac3 Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Sat, 4 Apr 2015 19:37:33 -0400 Subject: [PATCH] Fix several unused variable warnings in the release build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Justin M. Keyes Reviewed-by: Eliseo Martínez --- src/nvim/tag.c | 4 ++++ src/nvim/undo.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 1f6b42d9cf..d84f5f0208 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -2783,7 +2783,11 @@ int get_tags(list_T *list, char_u *pat) if (ret == OK && num_matches > 0) { for (i = 0; i < num_matches; ++i) { int parse_result = parse_match(matches[i], &tp); + + // Avoid an unused variable warning in release builds. + (void) parse_result; assert(parse_result == OK); + is_static = test_for_static(&tp); /* Skip pseudo-tag lines. */ diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 67195235fe..601c3af741 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -2677,7 +2677,10 @@ void u_undoline(void) void u_blockfree(buf_T *buf) { while (buf->b_u_oldhead != NULL) { +#ifndef NDEBUG u_header_T *previous_oldhead = buf->b_u_oldhead; +#endif + u_freeheader(buf, buf->b_u_oldhead, NULL); assert(buf->b_u_oldhead != previous_oldhead); }