Fix cppcheck warnings (#11883)

* remove unused variable

* limit scope of variable 'ret'

* pass shared_ptr<SkBitmap> by reference

* silence warning: value reassign before read

* fix oops

* don't refer to 'response' after std::move()ing it

* make the linter happy
This commit is contained in:
Charles Kerr 2018-02-14 02:21:46 -06:00 committed by GitHub
parent f8b7145c6b
commit 402201ac39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -72,10 +72,10 @@ std::unique_ptr<base::DictionaryValue>
CreateFailureResponse(int id, const std::string& param) {
auto response = base::MakeUnique<base::DictionaryValue>();
auto error_object = base::MakeUnique<base::DictionaryValue>();
response->Set(kError, std::move(error_object));
error_object->SetInteger(params::kErrorCode, kErrorInvalidParams);
error_object->SetString(params::kErrorMessage,
base::StringPrintf("Missing or Invalid '%s' parameter", param.c_str()));
response->Set(kError, std::move(error_object));
return response;
}