summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Rosen Penev2019-12-10 21:00:28 -0800
committerGravatar Rosen Penev2020-04-12 16:05:01 -0700
commit8bd04f650342fd7225765ef6194c411bc54ce7e5 (patch)
tree4823416e0241626a30921330e146901277cf9f2e /src
parent791c218b48b6557f24d479a7aa7d6586a612a128 (diff)
downloadidevicerestore-8bd04f650342fd7225765ef6194c411bc54ce7e5.tar.gz
idevicerestore-8bd04f650342fd7225765ef6194c411bc54ce7e5.tar.bz2
Fix missing declaration warnings
Allows better compilation by the compiler.
Diffstat (limited to 'src')
-rw-r--r--src/dfu.c2
-rw-r--r--src/img4.c6
-rw-r--r--src/limera1n_payload.h5
-rw-r--r--src/recovery.c2
-rw-r--r--src/restore.c20
5 files changed, 19 insertions, 16 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 8ef828e..fab05de 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -33,7 +33,7 @@
#include "idevicerestore.h"
#include "common.h"
-int dfu_progress_callback(irecv_client_t client, const irecv_event_t* event) {
+static int dfu_progress_callback(irecv_client_t client, const irecv_event_t* event) {
if (event->type == IRECV_PROGRESS) {
print_progress_bar(event->progress);
}
diff --git a/src/img4.c b/src/img4.c
index 7ce3532..e1914b7 100644
--- a/src/img4.c
+++ b/src/img4.c
@@ -265,7 +265,7 @@ static const unsigned char *asn1_find_element(unsigned int index, unsigned char
return &data[off];
}
-const char *_img4_get_component_tag(const char *compname)
+static const char *_img4_get_component_tag(const char *compname)
{
struct comp_tags {
const char *comp;
@@ -457,7 +457,7 @@ int img4_stitch_component(const char* component_name, const unsigned char* compo
| (((x) & 0x000000FF) << 24))
#endif
-void _manifest_write_key_value(unsigned char **p, unsigned int *length, const char *tag, int type, void *value, int size)
+static void _manifest_write_key_value(unsigned char **p, unsigned int *length, const char *tag, int type, void *value, int size)
{
uint32_t utag = __bswap_32(*(uint32_t*)tag);
asn1_write_priv_element(p, length, utag);
@@ -490,7 +490,7 @@ void _manifest_write_key_value(unsigned char **p, unsigned int *length, const ch
*p += this_length + outer_length + inner_length;
}
-void _manifest_write_component(unsigned char **p, unsigned int *length, const char *tag, plist_t comp)
+static void _manifest_write_component(unsigned char **p, unsigned int *length, const char *tag, plist_t comp)
{
uint32_t utag = __bswap_32(*(uint32_t*)tag);
asn1_write_priv_element(p, length, utag);
diff --git a/src/limera1n_payload.h b/src/limera1n_payload.h
index bec3105..0a213db 100644
--- a/src/limera1n_payload.h
+++ b/src/limera1n_payload.h
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+extern unsigned char limera1n_payload[];
+
unsigned char limera1n_payload[] = {
0x7f, 0x46, 0x07, 0xe0, 0xc0, 0x46, 0xc0, 0x46,
0xc0, 0x46, 0xc0, 0x46, 0xc0, 0x46, 0xc0, 0x46,
@@ -91,4 +93,5 @@ unsigned char limera1n_payload[] = {
0xb0, 0xb5, 0x02, 0xaf, 0x82, 0xb0, 0x01, 0x28,
0x00, 0x4b, 0x18, 0x47, 0x00, 0x00, 0x00, 0x41
};
-unsigned int limera1n_payload_len = 560;
+__attribute__((unused))
+static unsigned int limera1n_payload_len = 560;
diff --git a/src/recovery.c b/src/recovery.c
index 79c40ce..4bb1b9d 100644
--- a/src/recovery.c
+++ b/src/recovery.c
@@ -35,7 +35,7 @@
#include "restore.h"
#include "recovery.h"
-int recovery_progress_callback(irecv_client_t client, const irecv_event_t* event) {
+static int recovery_progress_callback(irecv_client_t client, const irecv_event_t* event) {
if (event->type == IRECV_PROGRESS) {
//print_progress_bar(event->progress);
}
diff --git a/src/restore.c b/src/restore.c
index 5763fcf..4e62d58 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -617,7 +617,7 @@ const char* restore_progress_string(unsigned int operation)
static int lastop = 0;
-int restore_handle_previous_restore_log_msg(restored_client_t client, plist_t msg)
+static int restore_handle_previous_restore_log_msg(restored_client_t client, plist_t msg)
{
plist_t node = NULL;
char* restorelog = NULL;
@@ -761,7 +761,7 @@ int restore_handle_status_msg(restored_client_t client, plist_t msg)
return result;
}
-int restore_handle_bb_update_status_msg(restored_client_t client, plist_t msg)
+static int restore_handle_bb_update_status_msg(restored_client_t client, plist_t msg)
{
int result = -1;
plist_t node = plist_dict_get_item(msg, "Accepted");
@@ -1596,7 +1596,7 @@ leave:
return res;
}
-int restore_send_baseband_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t message)
+static int restore_send_baseband_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t message)
{
int res = -1;
uint64_t bb_cert_id = 0;
@@ -1787,7 +1787,7 @@ int restore_send_fdr_trust_data(restored_client_t restore, idevice_t device)
return 0;
}
-int restore_send_fud_data(restored_client_t restore, struct idevicerestore_client_t *client, plist_t build_identity, plist_t message)
+static int restore_send_fud_data(restored_client_t restore, struct idevicerestore_client_t *client, plist_t build_identity, plist_t message)
{
restored_error_t restore_error;
plist_t arguments;
@@ -1921,7 +1921,7 @@ int restore_send_fud_data(restored_client_t restore, struct idevicerestore_clien
return 0;
}
-plist_t restore_get_se_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
+static plist_t restore_get_se_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
{
const char *comp_name = NULL;
char *comp_path = NULL;
@@ -2010,7 +2010,7 @@ plist_t restore_get_se_firmware_data(restored_client_t restore, struct idevicere
return response;
}
-plist_t restore_get_savage_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
+static plist_t restore_get_savage_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
{
char *comp_name = NULL;
char *comp_path = NULL;
@@ -2102,7 +2102,7 @@ plist_t restore_get_savage_firmware_data(restored_client_t restore, struct idevi
return response;
}
-plist_t restore_get_yonkers_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
+static plist_t restore_get_yonkers_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
{
char *comp_name = NULL;
char *comp_path = NULL;
@@ -2188,7 +2188,7 @@ plist_t restore_get_yonkers_firmware_data(restored_client_t restore, struct idev
return response;
}
-plist_t restore_get_rose_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
+static plist_t restore_get_rose_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
{
char *comp_name = NULL;
char *comp_path = NULL;
@@ -2325,7 +2325,7 @@ plist_t restore_get_rose_firmware_data(restored_client_t restore, struct idevice
return response;
}
-plist_t restore_get_veridian_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
+static plist_t restore_get_veridian_firmware_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t p_info)
{
char *comp_name = "BMU,FirmwareMap";
char *comp_path = NULL;
@@ -2423,7 +2423,7 @@ plist_t restore_get_veridian_firmware_data(restored_client_t restore, struct ide
return response;
}
-int restore_send_firmware_updater_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t message)
+static int restore_send_firmware_updater_data(restored_client_t restore, struct idevicerestore_client_t* client, plist_t build_identity, plist_t message)
{
plist_t arguments;
plist_t p_type, p_updater_name, p_loop_count, p_info;