Skip to content

False positives related to try catch blocks (Value stored to '...' during its initialization is never read) #11234

@llvmbot

Description

@llvmbot
Bugzilla Link 10862
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @tkremenek

Extended Description

Hi,

I am using scan-build (svn from 2011-09-02) to analyze c++ code and get a few false positives related to try catch blocks. My initial attempts to make a small test case did not succeed in replicating the bug. Below are two code snippets for which I get "Value stored to 'status' during its initialization is never read" in a large projet:


uint32_t status = info.refStatus;

try {
status = foo();
}
catch(...) {
}

bar(status);


int status = this->m_status;
this->m_status = foo();
try {
bar();
}
catch(...) {
this->m_status = status;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions