summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-04-03 22:33:04 +0200
committerthat <github@that.at>2015-04-03 22:33:04 +0200
commit2252d24c964df89189143e8d09626e9455e0f580 (patch)
treed877ec5b6918f2cbbc090692838e38f9130e06a6 /twrpTar.cpp
parentbootloader: fix crash with empty lines in /cache/recovery/command (diff)
downloadandroid_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.tar
android_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.tar.gz
android_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.tar.bz2
android_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.tar.lz
android_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.tar.xz
android_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.tar.zst
android_bootable_recovery-2252d24c964df89189143e8d09626e9455e0f580.zip
Diffstat (limited to 'twrpTar.cpp')
-rw-r--r--twrpTar.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index a8e75b3cb..bbe512598 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -118,8 +118,8 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
LOGINFO("Using encryption\n");
DIR* d;
struct dirent* de;
- unsigned long long regular_size = 0, encrypt_size = 0, target_size = 0, core_count = 1, total_size;
- unsigned enc_thread_id = 1, regular_thread_id = 0, i, start_thread_id = 1;
+ unsigned long long regular_size = 0, encrypt_size = 0, target_size = 0, total_size;
+ unsigned enc_thread_id = 1, regular_thread_id = 0, i, start_thread_id = 1, core_count = 1;
int item_len, ret, thread_error = 0;
std::vector<TarListStruct> RegularList;
std::vector<TarListStruct> EncryptList;
@@ -134,7 +134,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
core_count = sysconf(_SC_NPROCESSORS_CONF);
if (core_count > 8)
core_count = 8;
- LOGINFO(" Core Count : %llu\n", core_count);
+ LOGINFO(" Core Count : %u\n", core_count);
Archive_Current_Size = 0;
d = opendir(tardir.c_str());
@@ -223,7 +223,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
}
closedir(d);
if (enc_thread_id != core_count) {
- LOGERR("Error dividing up threads for encryption, %i threads for %i cores!\n", enc_thread_id, core_count);
+ LOGERR("Error dividing up threads for encryption, %u threads for %u cores!\n", enc_thread_id, core_count);
if (enc_thread_id > core_count) {
close(progress_pipe[1]);
_exit(-1);
@@ -311,7 +311,7 @@ int twrpTar::createTarFork(const unsigned long long *overall_size, const unsigne
_exit(-1);
} else {
LOGINFO("Joined thread %i.\n", i);
- ret = *((int *)thread_return);
+ ret = (int)(intptr_t)thread_return;
if (ret != 0) {
thread_error = 1;
LOGERR("Thread %i returned an error %i.\n", i, ret);
@@ -545,7 +545,7 @@ int twrpTar::extractTarFork(const unsigned long long *overall_size, unsigned lon
_exit(-1);
} else {
LOGINFO("Joined thread %i.\n", i);
- ret = *((int *)thread_return);
+ ret = (int)(intptr_t)thread_return;
if (ret != 0) {
thread_error = 1;
LOGERR("Thread %i returned an error %i.\n", i, ret);