Address a few compiler warnings

Change-Id: I6e063fba8d58c8c53da6bca6292c84e3392aee50
diff --git a/install.cpp b/install.cpp
index 9db5640..8e3d6d6 100644
--- a/install.cpp
+++ b/install.cpp
@@ -219,7 +219,7 @@
     ui->Print("Verifying update package...\n");
 
     int err;
-    err = verify_file(map.addr, map.length, loadedKeys, numKeys);
+    err = verify_file(map.addr, map.length);
     free(loadedKeys);
     LOGI("verify_file returned %d\n", err);
     if (err != VERIFY_SUCCESS) {
diff --git a/libtar/block.c b/libtar/block.c
index 1cfc0e4..6ed9e60 100644
--- a/libtar/block.c
+++ b/libtar/block.c
@@ -11,7 +11,7 @@
 */
 
 #include <internal.h>
-
+#include <stdio.h>
 #include <errno.h>
 
 #ifdef STDC_HEADERS
diff --git a/minuitwrp/graphics_utils.c b/minuitwrp/graphics_utils.c
index 96f6449..6083c75 100644
--- a/minuitwrp/graphics_utils.c
+++ b/minuitwrp/graphics_utils.c
@@ -15,6 +15,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <png.h>
 #include <pixelflinger/pixelflinger.h>
 #include <linux/fb.h>
diff --git a/partition.cpp b/partition.cpp
index 0651541..6a7ad71 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1386,7 +1386,7 @@
 	if (Is_Decrypted) {
 		if (!UnMount(true))
 			return false;
-		if (delete_crypto_blk_dev("userdata") != 0) {
+		if (delete_crypto_blk_dev((char*)("userdata")) != 0) {
 			LOGERR("Error deleting crypto block device, continuing anyway.\n");
 		}
 	}
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 098169c..f967edf 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -634,7 +634,7 @@
 		return;
 	}
 
-	while (p = readdir(d)) {
+	while ((p = readdir(d))) {
 		if (!strcmp(p->d_name, ".") || !strcmp(p->d_name, ".."))
 			continue;
 
@@ -675,7 +675,7 @@
 }
 
 int TWPartitionManager::Run_Backup(void) {
-	int check, do_md5, partition_count, disable_free_space_check = 0;
+	int check, do_md5, partition_count = 0, disable_free_space_check = 0;
 	string Backup_Folder, Backup_Name, Full_Backup_Path, Backup_List, backup_path;
 	unsigned long long total_bytes = 0, file_bytes = 0, img_bytes = 0, free_space = 0, img_bytes_remaining, file_bytes_remaining, subpart_size;
 	unsigned long img_time = 0, file_time = 0;
diff --git a/twrpDigest.cpp b/twrpDigest.cpp
index c3cff71..8380d2c 100644
--- a/twrpDigest.cpp
+++ b/twrpDigest.cpp
@@ -86,7 +86,7 @@
 }
 
 int twrpDigest::read_md5digest(void) {
-	int i = 0;
+	size_t i = 0;
 	bool foundMd5File = false;
 	string md5file = "";
 	vector<string> md5ext;
diff --git a/twrpTar.cpp b/twrpTar.cpp
index 90c7ea3..a8e75b3 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -1263,7 +1263,7 @@
 
 int twrpTar::removeEOT(string tarFile) {
 	char* charTarFile = (char*) tarFile.c_str();
-	off_t tarFileEnd;
+	off_t tarFileEnd = 0;
 	while (th_read(t) == 0) {
 		if (TH_ISREG(t))
 			tar_skip_regfile(t);
@@ -1271,7 +1271,7 @@
 	}
 	if (tar_close(t) == -1)
 		return -1;
-	if (truncate(charTarFile, tarFileEnd) == -1)
+	if (tarFileEnd > 0 && truncate(charTarFile, tarFileEnd) == -1)
 		return -1;
 	return 0;
 }