diff --git a/Android.mk b/Android.mk
index cde66d9..f4ba3f3 100644
--- a/Android.mk
+++ b/Android.mk
@@ -61,6 +61,7 @@
 LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
 LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
 LOCAL_MODULE_TAGS := eng tests
+LOCAL_CFLAGS := -Werror -Wall -Wno-missing-field-initializers
 
 LOCAL_CXX_STL := libc++
 include $(BUILD_STATIC_LIBRARY)
@@ -75,7 +76,7 @@
 	$(common_src_files)
 
 LOCAL_C_INCLUDES := $(common_c_includes)
-LOCAL_CFLAGS := -Werror=format
+LOCAL_CFLAGS := -Werror -Wall -Wno-missing-field-initializers
 LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
 LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
 
@@ -89,5 +90,6 @@
 LOCAL_SRC_FILES:= vdc.c
 LOCAL_MODULE:= vdc
 LOCAL_SHARED_LIBRARIES := libcutils
+LOCAL_CFLAGS := -Werror -Wall -Wno-missing-field-initializers
 
 include $(BUILD_EXECUTABLE)
diff --git a/CheckBattery.cpp b/CheckBattery.cpp
index 21d426b..6390d02 100644
--- a/CheckBattery.cpp
+++ b/CheckBattery.cpp
@@ -22,68 +22,6 @@
 
 using namespace android;
 
-namespace
-{
-    // How often to check battery in seconds
-    const int CHECK_PERIOD = 30;
-
-    // How charged should the battery be (percent) to start encrypting
-    const int START_THRESHOLD = 10;
-
-    // How charged should the battery be (percent) to continue encrypting
-    const int CONTINUE_THRESHOLD = 5;
-
-    const String16 serviceName("batteryproperties");
-
-    sp<IBinder> bs;
-    sp<IBatteryPropertiesRegistrar> interface;
-
-    bool singletonInitialized = false;
-    time_t last_checked = {0};
-    int last_result = 100;
-
-    int is_battery_ok(int threshold)
-    {
-        time_t now = time(NULL);
-        if (now == -1 || difftime(now, last_checked) < 5) {
-            goto finish;
-        }
-        last_checked = now;
-
-        if (!singletonInitialized) {
-            bs = defaultServiceManager()->checkService(serviceName);
-            if (bs == NULL) {
-                SLOGE("No batteryproperties service!");
-                goto finish;
-            }
-
-            interface = interface_cast<IBatteryPropertiesRegistrar>(bs);
-            if (interface == NULL) {
-                SLOGE("No IBatteryPropertiesRegistrar interface");
-                goto finish;
-            }
-
-            singletonInitialized = true;
-        }
-
-        {
-            BatteryProperty val;
-            status_t status = interface
-                ->getProperty(android::BATTERY_PROP_CAPACITY, &val);
-            if (status == NO_ERROR) {
-                SLOGD("Capacity is %d", (int)val.valueInt64);
-                last_result = val.valueInt64;
-            } else {
-                SLOGE("Failed to get battery charge");
-                last_result = 100;
-            }
-        }
-
-    finish:
-        return last_result >= threshold;
-    }
-}
-
 extern "C"
 {
     int is_battery_ok_to_start()
diff --git a/CommandListener.cpp b/CommandListener.cpp
index 8003095..261da8e 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -216,7 +216,6 @@
     if (!rc) {
         cli->sendMsg(ResponseCode::CommandOkay, "volume operation succeeded", false);
     } else {
-        int erno = errno;
         rc = ResponseCode::convertFromErrno();
         cli->sendMsg(rc, "volume operation failed", true);
     }
diff --git a/Devmapper.cpp b/Devmapper.cpp
index 700e538..703902f 100644
--- a/Devmapper.cpp
+++ b/Devmapper.cpp
@@ -296,7 +296,7 @@
 
 void *Devmapper::_align(void *ptr, unsigned int a)
 {
-        register unsigned long agn = --a;
+        unsigned long agn = --a;
 
         return (void *) (((unsigned long) ptr + agn) & ~agn);
 }
diff --git a/Ext4.cpp b/Ext4.cpp
index dc31fd0..f5a964a 100644
--- a/Ext4.cpp
+++ b/Ext4.cpp
@@ -112,7 +112,6 @@
 }
 
 int Ext4::format(const char *fsPath, unsigned int numSectors, const char *mountpoint) {
-    int fd;
     const char *args[7];
     int rc;
     int status;
diff --git a/Fat.cpp b/Fat.cpp
index cd4ea5f..6ac1f8a 100644
--- a/Fat.cpp
+++ b/Fat.cpp
@@ -50,7 +50,6 @@
 extern "C" int mount(const char *, const char *, const char *, unsigned long, const void *);
 
 int Fat::check(const char *fsPath) {
-    bool rw = true;
     if (access(FSCK_MSDOS_PATH, X_OK)) {
         SLOGW("Skipping fs checks\n");
         return 0;
@@ -170,7 +169,6 @@
 }
 
 int Fat::format(const char *fsPath, unsigned int numSectors, bool wipe) {
-    int fd;
     const char *args[11];
     int rc;
     int status;
diff --git a/Process.cpp b/Process.cpp
index 08be28e..b675436 100644
--- a/Process.cpp
+++ b/Process.cpp
@@ -191,7 +191,6 @@
     }
 
     while ((de = readdir(dir))) {
-        int killed = 0;
         int pid = getPid(de->d_name);
         char name[PATH_MAX];
 
diff --git a/Volume.cpp b/Volume.cpp
index bfad29d..75cc4c1 100644
--- a/Volume.cpp
+++ b/Volume.cpp
@@ -332,7 +332,7 @@
 
 int Volume::mountVol() {
     dev_t deviceNodes[4];
-    int n, i, rc = 0;
+    int n, i;
     char errmsg[255];
 
     int flags = getFlags();
@@ -454,7 +454,6 @@
         }
 
         errno = 0;
-        int gid;
 
         if (Fat::doMount(devicePath, getMountpoint(), false, false, false,
                 AID_MEDIA_RW, AID_MEDIA_RW, 0007, true)) {
@@ -549,8 +548,6 @@
 }
 
 int Volume::unmountVol(bool force, bool revert) {
-    int i, rc;
-
     int flags = getFlags();
     bool providesAsec = (flags & VOL_PROVIDES_ASEC) != 0;
 
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;
 
diff --git a/cryptfs.c b/cryptfs.c
index a29053b..aefc606 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -473,7 +473,7 @@
 static int put_crypt_ftr_and_key(struct crypt_mnt_ftr *crypt_ftr)
 {
   int fd;
-  unsigned int nr_sec, cnt;
+  unsigned int cnt;
   /* starting_off is set to the SEEK_SET offset
    * where the crypto structure starts
    */
@@ -612,7 +612,7 @@
 static int get_crypt_ftr_and_key(struct crypt_mnt_ftr *crypt_ftr)
 {
   int fd;
-  unsigned int nr_sec, cnt;
+  unsigned int cnt;
   off64_t starting_off;
   int rc = -1;
   char *fname = NULL;
@@ -805,7 +805,6 @@
     char *fname;
     off64_t write_offset;
     off64_t erase_offset;
-    int found = 0;
     int fd;
     int ret;
 
@@ -1021,7 +1020,6 @@
     char buffer[DM_CRYPT_BUF_SIZE];
     struct dm_ioctl *io;
     struct dm_target_versions *v;
-    int i;
 
     io = (struct dm_ioctl *) buffer;
 
@@ -1053,13 +1051,9 @@
                                     char *real_blk_name, char *crypto_blk_name, const char *name)
 {
   char buffer[DM_CRYPT_BUF_SIZE];
-  char master_key_ascii[129]; /* Large enough to hold 512 bit key and null */
-  char *crypt_params;
   struct dm_ioctl *io;
-  struct dm_target_spec *tgt;
   unsigned int minor;
   int fd;
-  int i;
   int retval = -1;
   int version[3];
   char *extra_params;
@@ -1416,8 +1410,6 @@
         struct crypt_mnt_ftr *crypt_ftr) {
     int fd;
     unsigned char key_buf[KEY_LEN_BYTES];
-    EVP_CIPHER_CTX e_ctx;
-    int encrypted_len, final_len;
 
     /* Get some random bits for a key */
     fd = open("/dev/urandom", O_RDONLY);
@@ -1543,13 +1535,8 @@
 /* returns < 0 on failure */
 static int cryptfs_restart_internal(int restart_main)
 {
-    char fs_type[32];
-    char real_blkdev[MAXPATHLEN];
     char crypto_blkdev[MAXPATHLEN];
-    char fs_options[256];
-    unsigned long mnt_flags;
-    struct stat statbuf;
-    int rc = -1, i;
+    int rc = -1;
     static int restart_successful = 0;
 
     /* Validate that it's OK to call this routine */
@@ -1730,8 +1717,6 @@
   char tmp_mount_point[64];
   unsigned int orig_failed_decrypt_count;
   int rc;
-  kdf_func kdf;
-  void *kdf_params;
   int use_keymaster = 0;
   int upgrade = 0;
   unsigned char* intermediate_key = 0;
@@ -1877,7 +1862,8 @@
     char real_blkdev[MAXPATHLEN], crypto_blkdev[MAXPATHLEN];
     struct crypt_mnt_ftr sd_crypt_ftr;
     struct stat statbuf;
-    int nr_sec, fd;
+    unsigned int nr_sec;
+    int fd;
 
     sprintf(real_blkdev, "/dev/block/vold/%d:%d", major, minor);
 
@@ -2544,7 +2530,6 @@
                                        off64_t tot_size,
                                        off64_t previously_encrypted_upto)
 {
-    u32 i;
     struct encryptGroupsData data;
     struct f2fs_info *f2fs_info = NULL;
     int rc = ENABLE_INPLACE_ERR_OTHER;
@@ -2838,7 +2823,7 @@
                                       int previously_encrypted_upto)
 {
     off64_t cur_encryption_done=0, tot_encryption_size=0;
-    int i, rc = -1;
+    int rc = -1;
 
     if (!is_battery_ok_to_start()) {
         SLOGW("Not starting encryption due to low battery");
@@ -2893,7 +2878,7 @@
     char crypto_blkdev[MAXPATHLEN], real_blkdev[MAXPATHLEN];
     unsigned long nr_sec;
     unsigned char decrypted_master_key[KEY_LEN_BYTES];
-    int rc=-1, fd, i, ret;
+    int rc=-1, fd, i;
     struct crypt_mnt_ftr crypt_ftr;
     struct crypt_persist_data *pdata;
     char encrypted_state[PROPERTY_VALUE_MAX];
@@ -3260,7 +3245,6 @@
 int cryptfs_changepw(int crypt_type, const char *newpw)
 {
     struct crypt_mnt_ftr crypt_ftr;
-    unsigned char decrypted_master_key[KEY_LEN_BYTES];
 
     /* This is only allowed after we've successfully decrypted the master key */
     if (!master_key_saved) {
@@ -3371,7 +3355,6 @@
 int cryptfs_getfield(char *fieldname, char *value, int len)
 {
     char temp_value[PROPERTY_VALUE_MAX];
-    char real_blkdev[MAXPATHLEN];
     /* 0 is success, 1 is not encrypted,
      * -1 is value not set, -2 is any other error
      */
@@ -3401,9 +3384,6 @@
 /* Set the value of the specified field. */
 int cryptfs_setfield(char *fieldname, char *value)
 {
-    struct crypt_persist_data stored_pdata;
-    struct crypt_persist_data *pdata_p;
-    struct crypt_mnt_ftr crypt_ftr;
     char encrypted_state[PROPERTY_VALUE_MAX];
     /* 0 is success, -1 is an error */
     int rc = -1;
