Make vold compile with -Werror -Wall.
-Wno-missing-field-initializers is used as well, but that is an
overzealous warning from initializing structs with {0} and not a
real warning.
bug 18736778 and 16868177
Change-Id: Iffde89cd7200d9a11193e1614f1819f9fcace30a
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 14f1509..0409ce8 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -238,7 +238,9 @@
}
void VolumeManager::handleBlockEvent(NetlinkEvent *evt) {
+#ifdef NETLINK_DEBUG
const char *devpath = evt->findParam("DEVPATH");
+#endif
/* Lookup a volume to handle this device */
VolumeCollection::iterator it;
@@ -1216,8 +1218,6 @@
int VolumeManager::findAsec(const char *id, char *asecPath, size_t asecPathLen,
const char **directory) const {
- int dirfd, fd;
- const int idLen = strlen(id);
char *asecName;
if (!isLegalAsecId(id)) {
@@ -1297,7 +1297,7 @@
char dmDevice[255];
bool cleanupDm = false;
- int fd;
+
unsigned int nr_sec = 0;
struct asec_superblock sb;