Fix bugprone-use-after-move warnings
Bug: 150783499 Test: WITH_TIDY=1 make Change-Id: I745d8bfde00a77bcdbbeaa21cfe81af1c74a971c Merged-In: I745d8bfde00a77bcdbbeaa21cfe81af1c74a971c
This commit is contained in:
committed by
Ryan Mitchell
parent
e35e87f514
commit
ad2d924b34
@@ -85,6 +85,7 @@ static jlong NativeLoadFromFd(JNIEnv* env, jclass /*clazz*/, jobject file_descri
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto dup_fd_id = dup_fd.get();
|
||||
std::unique_ptr<const ApkAssets> apk_assets = ApkAssets::LoadFromFd(std::move(dup_fd),
|
||||
friendly_name_utf8.c_str(),
|
||||
system, force_shared_lib,
|
||||
@@ -92,7 +93,7 @@ static jlong NativeLoadFromFd(JNIEnv* env, jclass /*clazz*/, jobject file_descri
|
||||
|
||||
if (apk_assets == nullptr) {
|
||||
std::string error_msg = base::StringPrintf("Failed to load asset path %s from fd %d",
|
||||
friendly_name_utf8.c_str(), dup_fd.get());
|
||||
friendly_name_utf8.c_str(), dup_fd_id);
|
||||
jniThrowException(env, "java/io/IOException", error_msg.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user