[llvm-bugs] [Bug 24577] New: Clang Static Analyzer mistakenly believe that a stored value is not read

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 25 13:46:27 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24577

            Bug ID: 24577
           Summary: Clang Static Analyzer mistakenly believe that a stored
                    value is not read
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: haneef503 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 14775
  --> https://llvm.org/bugs/attachment.cgi?id=14775&action=edit
check lines 565 and 568

The scan-build report states that the assignment (line 565):

err = recvmmsg (s, reqvec, online, 0, &t);

is never read, despite the fact that the very next line of code (line 568):

if (xm_unlikely ((err = -1) && ((errno != EAGAIN) || (errno != EWOULDBLOCK))))
{

check the `err` variable. The macro `xm_unlikely(x)` translates to
`__builtin_expect(!!(x), 0)` and is just used to inform the compiler the the
branch is unlikely to be taken.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150825/60494229/attachment.html>


More information about the llvm-bugs mailing list