| Summary: | False "Statement has no effect" warnings on assignment of class instances. | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Vadym Krevs <vkrevs> |
| Component: | cdt-codan | Assignee: | Elena Laskavaia <elaskavaia.cdt> |
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 7.0 | ||
| Target Milestone: | 7.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
fixed *** cdt cvs genie on behalf of elaskavaia *** Bug 313817 Fixed f.p. when assignment is overloaded operator [*] StatementHasNoEffectChecker.java 1.12 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/StatementHasNoEffectChecker.java?root=Tools_Project&r1=1.11&r2=1.12 |
Build Identifier: I20100518-0800 Create a new CPP file containing #include <string> std::string gettempdir() { return "Hello"; } void foo() { std::string jailDir; jailDir = gettempdir(); chdir(jailDir); } Problem analysis highlights "jaildir=gettempdir()" and adds a "Statement has no effect" warning to the problems list. Assignment of primitive types does not seem to be affected. Reproducible: Always