<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">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><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 class="HOEnZb"><font color="#888888"><br>
Jim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Sep 9, 2014, at 1:57 AM, Eric Christopher <<a href="mailto:echristo@gmail.com">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">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">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><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>
</div>