From 83ca56ac98c089dfa5d61f282353e9ae2024797e Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 9 Mar 2015 18:29:07 -0700 Subject: [PATCH] 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 --- adb/set_verity_enable_state_service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/set_verity_enable_state_service.cpp b/adb/set_verity_enable_state_service.cpp index 7fa829160..85637f207 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;