summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--install.cpp2
-rw-r--r--libtar/block.c2
-rw-r--r--minuitwrp/graphics_utils.c1
-rw-r--r--partition.cpp2
-rw-r--r--partitionmanager.cpp4
-rw-r--r--twrpDigest.cpp2
-rw-r--r--twrpTar.cpp4
7 files changed, 9 insertions, 8 deletions
diff --git a/install.cpp b/install.cpp
index 9db5640a0..8e3d6d6d9 100644
--- a/install.cpp
+++ b/install.cpp
@@ -219,7 +219,7 @@ really_install_package(const char *path, int* wipe_cache, bool needs_mount)
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 1cfc0e418..6ed9e6000 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 96f644962..6083c7599 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 065154150..6a7ad718d 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1386,7 +1386,7 @@ bool TWPartition::Wipe_Encryption() {
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 098169c3b..f967edfbc 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -634,7 +634,7 @@ void TWPartitionManager::Clean_Backup_Folder(string Backup_Folder) {
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::Cancel_Backup() {
}
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 c3cff7194..8380d2c8b 100644
--- a/twrpDigest.cpp
+++ b/twrpDigest.cpp
@@ -86,7 +86,7 @@ int twrpDigest::write_md5digest(void) {
}
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 90c7ea34c..a8e75b3cb 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -1263,7 +1263,7 @@ int twrpTar::closeTar() {
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 @@ int twrpTar::removeEOT(string tarFile) {
}
if (tar_close(t) == -1)
return -1;
- if (truncate(charTarFile, tarFileEnd) == -1)
+ if (tarFileEnd > 0 && truncate(charTarFile, tarFileEnd) == -1)
return -1;
return 0;
}