From 8a67bf72984123302da6521d66a51f9c09a9504b Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 24 Jul 2015 00:23:29 +0000 Subject: Add UNUSED_IF_ASSERT_DISABLED and apply it. Summary: This replaces (void)x; usages where they x was subsequently involved in an assertion with this macro to make the intent more clear. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11451 llvm-svn: 243074 --- lldb/source/Interpreter/CommandInterpreter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp') diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 1da541b8c00..965ba5b7dc1 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -511,8 +511,7 @@ CommandInterpreter::LoadCommandDictionary () char buffer[1024]; int num_printed = snprintf(buffer, 1024, "%s %s", break_regexes[i][1], "-o"); assert (num_printed < 1024); - // Quiet unused variable warning for release builds. - (void) num_printed; + UNUSED_IF_ASSERT_DISABLED(num_printed); success = tbreak_regex_cmd_ap->AddRegexCommand (break_regexes[i][0], buffer); if (!success) break; -- cgit v1.2.3