Fix a static-analyzer warning.
frameworks/base/tools/aapt2/util/Files.cpp:81:21: warning: Null pointer
passed as an argument to a 'nonnull' parameter
while ((entry = readdir(dir))) {
Bug: None.
Test: Warning no longer appears.
Change-Id: If242598405e995928378ce317a2e909654e1e985
This commit is contained in:
@@ -72,8 +72,8 @@ std::vector<std::string> listFiles(const StringPiece& root, std::string* outErro
|
||||
std::stringstream errorStr;
|
||||
errorStr << "unable to open file: " << strerror(errno);
|
||||
*outError = errorStr.str();
|
||||
return {};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::string> files;
|
||||
|
||||
Reference in New Issue
Block a user