summaryrefslogtreecommitdiffstats
path: root/src/asr.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-10-02 14:30:19 +0200
committerGravatar Nikias Bassen2013-10-02 14:30:19 +0200
commit8b3c005184e1b03666e67cc68014e3496664066d (patch)
treef88a29a3bbeb29b135f7d9dadbdc01aa14ff28db /src/asr.c
parent0326deeba3ec0f11e0386d9448bf670f24dfff22 (diff)
downloadidevicerestore-8b3c005184e1b03666e67cc68014e3496664066d.tar.gz
idevicerestore-8b3c005184e1b03666e67cc68014e3496664066d.tar.bz2
asr: supress compiler warnings with proper cast
Diffstat (limited to 'src/asr.c')
-rw-r--r--src/asr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/asr.c b/src/asr.c
index 5b029e8..e3019e6 100644
--- a/src/asr.c
+++ b/src/asr.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <libimobiledevice/libimobiledevice.h>
#include <openssl/sha.h>
@@ -381,7 +382,7 @@ int asr_send_payload(asr_client_t asr, const char* filesystem) {
if (add_checksum) {
// get sha1 of last chunk
- SHA1_Final(data, &sha1);
+ SHA1_Final((unsigned char*)data, &sha1);
// send checksum
if (asr_send_buffer(asr, data, 20) < 0) {
@@ -409,7 +410,7 @@ int asr_send_payload(asr_client_t asr, const char* filesystem) {
// if last chunk wasn't terminated with a checksum we do it here
if (asr->checksum_chunks && !add_checksum) {
// get sha1 of last chunk
- SHA1_Final(data, &sha1);
+ SHA1_Final((unsigned char*)data, &sha1);
// send checksum
if (asr_send_buffer(asr, data, 20) < 0) {