<div dir="ltr"><div dir="ltr"></div><div dir="ltr">On Mon, Oct 25, 2021 at 11:56 AM Sterling Augustine <<a href="mailto:saugustine@google.com" target="_blank">saugustine@google.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The function call itself has side effects, so needs to be preserved. So one could just remove the variable itself while preserving the function call, I suppose, but the function does return a value and it seems like a better test would actually check something about it.</div></blockquote><div><br>Oh, sorry, didn't mean to suggest removing the function call, only the unused variable.<br><br>But, sure, maybe some added testing would be useful (though I'd guess it's tested elsewhere & isn't as relevant to the fuzz testing routine) - Added Matt Morehouse the original reviewer (couldn't find a contact point for the original author): Matt, could you check whether this would benefit from more testing, otherwise remove the unused variable?<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 11:47 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Looks like this variable can be removed/is genuinely unused?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 20, 2021 at 10:00 AM Sterling Augustine via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Sterling Augustine<br>
Date: 2021-10-20T09:59:16-07:00<br>
New Revision: 6b6564fcf9f5cce91630d1888d7e95b187bfc320<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/6b6564fcf9f5cce91630d1888d7e95b187bfc320" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/6b6564fcf9f5cce91630d1888d7e95b187bfc320</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/6b6564fcf9f5cce91630d1888d7e95b187bfc320.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/6b6564fcf9f5cce91630d1888d7e95b187bfc320.diff</a><br>
<br>
LOG: Fix unused variable warning.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp<br>
index 1251a4e518ed0..7c6ecfb13687b 100644<br>
--- a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp<br>
+++ b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp<br>
@@ -671,6 +671,7 @@ TEST(Corpus, Replace) {<br>
                      /*TimeOfUnit*/ std::chrono::microseconds(5678),<br>
                      /*FeatureSet*/ {}, DFT,<br>
                      /*BaseII*/ nullptr);<br>
+  (void) SecondII;<br>
   Unit ReplacedU = Unit{0x03};<br>
<br>
   C->Replace(FirstII, ReplacedU,<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</div>