From 0d12fd668d9440b14ad72f1f89beb8c8cb9533fb Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 10 Mar 2022 20:07:43 +0000 Subject: [PATCH] Stop using -Wno-unused-variable This is a useful warning, so remove two unused variables and stop disabling this warning. Change-Id: I3efe0b300ea139ea11d645dec6fb2613acc0e51b --- Android.bp | 1 - VolumeManager.cpp | 1 - fs/Ext4.cpp | 2 -- 3 files changed, 4 deletions(-) diff --git a/Android.bp b/Android.bp index 38abdb9..c049e45 100644 --- a/Android.bp +++ b/Android.bp @@ -11,7 +11,6 @@ cc_defaults { "-Wextra", "-Wno-missing-field-initializers", "-Wno-unused-parameter", - "-Wno-unused-variable", ], clang: true, diff --git a/VolumeManager.cpp b/VolumeManager.cpp index bc51042..bc556ef 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp @@ -93,7 +93,6 @@ using android::vold::UnmountTree; using android::vold::VoldNativeService; using android::vold::VolumeBase; -static const char* kPathUserMount = "/mnt/user"; static const char* kPathVirtualDisk = "/data/misc/vold/virtual_disk"; static const char* kPropVirtualDisk = "persist.sys.virtual_disk"; diff --git a/fs/Ext4.cpp b/fs/Ext4.cpp index 7a5f5da..77cec80 100644 --- a/fs/Ext4.cpp +++ b/fs/Ext4.cpp @@ -66,8 +66,6 @@ status_t Check(const std::string& source, const std::string& target) { const char* c_source = source.c_str(); const char* c_target = target.c_str(); - - int status; int ret; long tmpmnt_flags = MS_NOATIME | MS_NOEXEC | MS_NOSUID; char* tmpmnt_opts = (char*)"nomblk_io_submit,errors=remount-ro";