Address a few compiler warnings
Change-Id: I6e063fba8d58c8c53da6bca6292c84e3392aee50
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <internal.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <png.h>
|
||||
#include <pixelflinger/pixelflinger.h>
|
||||
#include <linux/fb.h>
|
||||
|
||||
+1
-1
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user