From e96e7dea1c2cd12ddb2679b7f91775c48aff4d11 Mon Sep 17 00:00:00 2001 From: BALATON Zoltan Date: Tue, 5 May 2015 01:10:35 +0200 Subject: Fix some warnings --- src/common.c | 9 +++++++++ src/common.h | 9 +-------- src/idevicerestore.c | 2 -- src/limera1n.c | 2 -- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/common.c b/src/common.c index e731d00..b5af690 100644 --- a/src/common.c +++ b/src/common.c @@ -32,6 +32,15 @@ #define MAX_PRINT_LEN 64*1024 +struct idevicerestore_mode_t idevicerestore_modes[] = { + { 0, "WTF" }, + { 1, "DFU" }, + { 2, "Recovery" }, + { 3, "Restore" }, + { 4, "Normal" }, + { -1, NULL } +}; + int idevicerestore_debug = 0; #define idevicerestore_err_buff_size 256 diff --git a/src/common.h b/src/common.h index 61dfbb1..4d6441a 100644 --- a/src/common.h +++ b/src/common.h @@ -99,14 +99,7 @@ struct idevicerestore_client_t { void* progress_cb_data; }; -static struct idevicerestore_mode_t idevicerestore_modes[] = { - { 0, "WTF" }, - { 1, "DFU" }, - { 2, "Recovery" }, - { 3, "Restore" }, - { 4, "Normal" }, - { -1, NULL } -}; +extern struct idevicerestore_mode_t idevicerestore_modes[]; extern int idevicerestore_debug; diff --git a/src/idevicerestore.c b/src/idevicerestore.c index ed984d9..e9a50dd 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -570,14 +570,12 @@ int idevicerestore_start(struct idevicerestore_client_t* client) if (client->build_major > 8) { unsigned char* nonce = NULL; int nonce_size = 0; - int nonce_changed = 0; if (get_ap_nonce(client, &nonce, &nonce_size) < 0) { /* the first nonce request with older firmware releases can fail and it's OK */ info("NOTE: Unable to get nonce from device\n"); } if (!client->nonce || (nonce_size != client->nonce_size) || (memcmp(nonce, client->nonce, nonce_size) != 0)) { - nonce_changed = 1; if (client->nonce) { free(client->nonce); } diff --git a/src/limera1n.c b/src/limera1n.c index a716f24..1ec3661 100644 --- a/src/limera1n.c +++ b/src/limera1n.c @@ -55,7 +55,6 @@ int limera1n_exploit(struct irecv_device *device, irecv_client_t *pclient) //unsigned int load_address = 0x84000000; unsigned int stack_address = 0; unsigned int shellcode_address = 0; - unsigned int shellcode_length = 0; irecv_device_t iphone4 = NULL; irecv_device_t iphone3gs = NULL; @@ -84,7 +83,6 @@ int limera1n_exploit(struct irecv_device *device, irecv_client_t *pclient) } memset(shellcode, 0x0, 0x800); - shellcode_length = sizeof(limera1n_payload); memcpy(shellcode, limera1n_payload, sizeof(limera1n_payload)); irecv_client_t client = *pclient; -- cgit v1.1-32-gdbae