summaryrefslogtreecommitdiffstats
path: root/adb/set_verity_enable_state_service.cpp
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-03-09 18:29:07 -0700
committerDan Albert <danalbert@google.com>2015-03-09 18:29:07 -0700
commit83ca56ac98c089dfa5d61f282353e9ae2024797e (patch)
treec8cb0d2ac834a41bae69b1e63c871be7c2265d40 /adb/set_verity_enable_state_service.cpp
parent5f2ccb0efd1331f0137e294bed7a076c472f0ed6 (diff)
downloadsystem_core-83ca56ac98c089dfa5d61f282353e9ae2024797e.zip
system_core-83ca56ac98c089dfa5d61f282353e9ae2024797e.tar.gz
system_core-83ca56ac98c089dfa5d61f282353e9ae2024797e.tar.bz2
Fix build from -Werror=maybe-uninitialized.
This won't actually ever be uninitialized because the code will take a failure path if the code that initializes it fails. The goto seems to thwart this check though. Not sure why this is only firing on userdebug builds yet. I'll look in to it tomorrow. Change-Id: Ie9d837d6baea255d2a4d169355b53dfd775eacce
Diffstat (limited to 'adb/set_verity_enable_state_service.cpp')
-rw-r--r--adb/set_verity_enable_state_service.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/set_verity_enable_state_service.cpp b/adb/set_verity_enable_state_service.cpp
index 7fa8291..85637f2 100644
--- a/adb/set_verity_enable_state_service.cpp
+++ b/adb/set_verity_enable_state_service.cpp
@@ -90,7 +90,7 @@ static int set_verity_enabled_state(int fd, const char *block_device,
uint32_t magic_number;
const uint32_t new_magic = enable ? VERITY_METADATA_MAGIC_NUMBER
: VERITY_METADATA_MAGIC_DISABLE;
- uint64_t device_length;
+ uint64_t device_length = 0;
int device = -1;
int retval = -1;