diff options
author | BALATON Zoltan | 2015-05-05 01:10:35 +0200 |
---|---|---|
committer | BALATON Zoltan | 2015-05-05 01:19:41 +0200 |
commit | e96e7dea1c2cd12ddb2679b7f91775c48aff4d11 (patch) | |
tree | 582fc533f3ae2e75c7df7819985be348ce3e37b9 /src | |
parent | 5656ccf5cb0432f9ee7d1ed9fbeae7a43d5ad2dd (diff) | |
download | idevicerestore-e96e7dea1c2cd12ddb2679b7f91775c48aff4d11.tar.gz idevicerestore-e96e7dea1c2cd12ddb2679b7f91775c48aff4d11.tar.bz2 |
Fix some warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/common.c | 9 | ||||
-rw-r--r-- | src/common.h | 9 | ||||
-rw-r--r-- | src/idevicerestore.c | 2 | ||||
-rw-r--r-- | 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; |