Issues found by Clang static analyzer
Bug #1314206 reported by
Jussi Pakkanen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dbus-cpp |
New
|
Undecided
|
Unassigned |
Bug Description
Running trunk static analyzer on DBus-cpp trunk uncovers some errors. Some are fixed by the std::move fix, the rest are as follows.
match_rule.cpp returns reference to a local variable's data:
dbus::MatchRule& dbus::MatchRule
{
MatchRule result {*this};
return result.args(p); // <- Right here
}
There are several dead assignments in generator.cpp. They are in function update() and here's the first one:
case DBUS_STRUCT_
result = state.update_
result = state.update_
break;
I didn't fix these myself because I'm not 100% sure what the correct fix is.
To post a comment you must log in.