From dfcd82c09e8ce4562ed39e006d4b1c8163b4e25e Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 16 Oct 2018 20:22:37 -0700 Subject: ART: Fix android-cloexec warnings Use the DupCloexec helper wherever possible. Add O_CLOEXEC to open and fopen calls. Bug: 32619234 Test: WITH_TIDY=1 mmma art Change-Id: I0afb1beea53ab8f68ab85d1762aff999903060fe --- dexlayout/dex_visualize.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dexlayout/dex_visualize.cc') diff --git a/dexlayout/dex_visualize.cc b/dexlayout/dex_visualize.cc index 4a36744e97..27cec8d951 100644 --- a/dexlayout/dex_visualize.cc +++ b/dexlayout/dex_visualize.cc @@ -53,7 +53,7 @@ class Dumper { bool OpenAndPrintHeader(size_t dex_index) { // Open the file and emit the gnuplot prologue. - out_file_ = fopen(MultidexName("layout", dex_index, ".gnuplot").c_str(), "w"); + out_file_ = fopen(MultidexName("layout", dex_index, ".gnuplot").c_str(), "we"); if (out_file_ == nullptr) { return false; } -- cgit v1.2.3-59-g8ed1b