Merge pull request #2353 from jszakmeister/fix-unused-var-warnings-in-release

Fix several unused variable warnings in the release build.
This commit is contained in:
John Szakmeister
2015-04-16 08:45:16 -04:00
2 changed files with 7 additions and 0 deletions

View File

@@ -2783,7 +2783,11 @@ int get_tags(list_T *list, char_u *pat)
if (ret == OK && num_matches > 0) { if (ret == OK && num_matches > 0) {
for (i = 0; i < num_matches; ++i) { for (i = 0; i < num_matches; ++i) {
int parse_result = parse_match(matches[i], &tp); int parse_result = parse_match(matches[i], &tp);
// Avoid an unused variable warning in release builds.
(void) parse_result;
assert(parse_result == OK); assert(parse_result == OK);
is_static = test_for_static(&tp); is_static = test_for_static(&tp);
/* Skip pseudo-tag lines. */ /* Skip pseudo-tag lines. */

View File

@@ -2773,7 +2773,10 @@ void u_undoline(void)
void u_blockfree(buf_T *buf) void u_blockfree(buf_T *buf)
{ {
while (buf->b_u_oldhead != NULL) { while (buf->b_u_oldhead != NULL) {
#ifndef NDEBUG
u_header_T *previous_oldhead = buf->b_u_oldhead; u_header_T *previous_oldhead = buf->b_u_oldhead;
#endif
u_freeheader(buf, buf->b_u_oldhead, NULL); u_freeheader(buf, buf->b_u_oldhead, NULL);
assert(buf->b_u_oldhead != previous_oldhead); assert(buf->b_u_oldhead != previous_oldhead);
} }