diff --git a/client/settings.cc b/client/settings.cc index 8a087b97..f10421a8 100644 --- a/client/settings.cc +++ b/client/settings.cc @@ -30,15 +30,15 @@ namespace crashpad { struct ALIGNAS(4) Settings::Data { static const uint16_t kSettingsVersion = 1; + enum Options : uint32_t { + kUploadsEnabled = 1 << 0, + }; + Data() : version(kSettingsVersion), options(0), last_upload_attempt_time(0), client_id() {} - enum Options : uint32_t { - kUploadsEnabled = 1 << 0, - }; - uint32_t version; uint32_t options; uint64_t last_upload_attempt_time; // time_t @@ -152,7 +152,7 @@ ScopedFileHandle Settings::OpenForReading() { ScopedFileHandle Settings::OpenForReadingAndWriting() { ScopedFileHandle handle(HANDLE_EINTR( - open(file_path(), O_RDWR | O_EXLOCK | O_CREAT))); + open(file_path(), O_RDWR | O_EXLOCK | O_CREAT, 0644))); PLOG_IF(ERROR, !handle.is_valid()) << "open for writing"; return handle.Pass(); } diff --git a/client/settings_test.cc b/client/settings_test.cc index debb7c19..6ff6197f 100644 --- a/client/settings_test.cc +++ b/client/settings_test.cc @@ -14,7 +14,6 @@ #include "client/settings.h" -#include "client/crash_report_database.h" #include "gtest/gtest.h" #include "util/file/file_io.h" #include "util/test/scoped_temp_dir.h"