From 56f5f7b79bca91d6b241d35be0f4bf56155cf855 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Tue, 11 Oct 2016 18:08:23 -0700 Subject: [PATCH] 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 --- tools/aapt2/util/Files.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/aapt2/util/Files.cpp b/tools/aapt2/util/Files.cpp index f5e49f11c082b..042ff0e6c1b9a 100644 --- a/tools/aapt2/util/Files.cpp +++ b/tools/aapt2/util/Files.cpp @@ -72,8 +72,8 @@ std::vector listFiles(const StringPiece& root, std::string* outErro std::stringstream errorStr; errorStr << "unable to open file: " << strerror(errno); *outError = errorStr.str(); - return {}; } + return {}; } std::vector files;