<div dir="ltr">It does show up a few more times. It's actually somewhat rare for the code in the assert to be long enough to justify pulling it out. I almost just folded this check in to the assert.<div><br></div><div>-eric</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 12:44 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We used to define macros for that kind of thing (like UNREF (num_printed)) or UNUSED or something similar to indicate this is only here for some code paths.  It essentially became self documenting.  We might want to do something like that if we don't already have a similar macro.<div><br></div><div>-Todd</div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Sep 9, 2014 at 12:23 PM,  <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you include a comment on this kind of change?  It looks dopey till you realize it's there to quiet a compiler warning.<br>
<span><font color="#888888"><br>
Jim<br>
</font></span><div><div><br>
> On Sep 9, 2014, at 1:57 AM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br>
><br>
> Author: echristo<br>
> Date: Tue Sep  9 03:57:33 2014<br>
> New Revision: 217429<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=217429&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=217429&view=rev</a><br>
> Log:<br>
> Quiet unused variable warning that only occurs<br>
> when compiling optimized.<br>
><br>
> Modified:<br>
>    lldb/trunk/source/Interpreter/CommandInterpreter.cpp<br>
><br>
> Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=217429&r1=217428&r2=217429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=217429&r1=217428&r2=217429&view=diff</a><br>
> ==============================================================================<br>
> --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)<br>
> +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Tue Sep  9 03:57:33 2014<br>
> @@ -469,6 +469,7 @@ CommandInterpreter::LoadCommandDictionar<br>
>             char buffer[1024];<br>
>             int num_printed = snprintf(buffer, 1024, "%s %s", break_regexes[i][1], "-o");<br>
>             assert (num_printed < 1024);<br>
> +         (void) num_printed;<br>
>             success = tbreak_regex_cmd_ap->AddRegexCommand (break_regexes[i][0], buffer);<br>
>             if (!success)<br>
>                 break;<br>
><br>
><br>
> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</div></div></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</font></span></div>
</blockquote></div><br></div>