Skip to content

Commit

Permalink
asr: supress compiler warnings with proper cast
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Oct 2, 2013
1 parent 0326dee commit 8b3c005
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/asr.c
Expand Up @@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libimobiledevice/libimobiledevice.h>
#include <openssl/sha.h>

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8b3c005

Please sign in to comment.