<p dir="ltr">Might be useful to explain in the comment why the variable is there?</p>
<div class="gmail_quote">On Mar 1, 2016 7:41 AM, "Dmitry Vyukov via llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dvyukov<br>
Date: Tue Mar 1 09:36:42 2016<br>
New Revision: 262342<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=262342&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=262342&view=rev</a><br>
Log:<br>
sanitizer_common: silence compiler warning<br>
<br>
<br>
Modified:<br>
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc<br>
<br>
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=262342&r1=262341&r2=262342&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=262342&r1=262341&r2=262342&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)<br>
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Tue Mar 1 09:36:42 2016<br>
@@ -5354,6 +5354,7 @@ INTERCEPTOR(SSIZE_T, recvfrom, int fd, v<br>
COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd);<br>
SIZE_T srcaddr_sz;<br>
if (srcaddr) srcaddr_sz = *addrlen;<br>
+ (void)srcaddr_sz; // prevent "set but not used" warning<br>
SSIZE_T res = REAL(recvfrom)(fd, buf, len, flags, srcaddr, addrlen);<br>
if (res > 0) {<br>
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, res);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>