diff options
author | 2025-07-01 01:06:50 +0200 | |
---|---|---|
committer | 2025-07-01 01:06:50 +0200 | |
commit | 460d8f14a1a343351a212ba96e16157cdc88d069 (patch) | |
tree | cf5bdd5ddb226a474508f9a916466af5e469b5be /src | |
parent | c752e8780b043c8822be2417cc5596b8f2ad9c0b (diff) | |
download | idevicerestore-460d8f14a1a343351a212ba96e16157cdc88d069.tar.gz idevicerestore-460d8f14a1a343351a212ba96e16157cdc88d069.tar.bz2 |
Fix a couple of compiler warnings and remove unused variables
Diffstat (limited to 'src')
-rw-r--r-- | src/ace3.c | 5 | ||||
-rw-r--r-- | src/common.c | 1 | ||||
-rw-r--r-- | src/idevicerestore.c | 3 | ||||
-rw-r--r-- | src/log.c | 2 |
4 files changed, 3 insertions, 8 deletions
@@ -70,10 +70,10 @@ static int uarp_version_convert(uint32_t* version_data, uint32_t* version_out) return 0; } if (version_out) { - *version_out = ((((0x147B * (unsigned int)((uint16_t)part3 >> 2)) >> 9) & 0x3FF00 | (0x10 * (((uint8_t)((uint16_t)part3 / 0xA) % 0xA) & 0xF)) | ((uint16_t)part3 % 0xA)) << 8) + *version_out = (((((0x147B * (unsigned int)((uint16_t)part3 >> 2)) >> 9) & 0x3FF00) | (0x10 * (((uint8_t)((uint16_t)part3 / 0xA) % 0xA) & 0xF)) | ((uint16_t)part3 % 0xA)) << 8) | ((((uint8_t)part1 % 0xA) | (0x10 * ((uint8_t)part1 / 0xA)) | part2) << 20) | ((uint8_t)part4 % 0xA) - | ((0xCD * (unsigned int)(uint8_t)part4) >> 7) & 0xF0; + | (((0xCD * (unsigned int)(uint8_t)part4) >> 7) & 0xF0); } return 0; } @@ -217,7 +217,6 @@ int ace3_create_binary(const void* uarp_fw, size_t uarp_size, uint64_t bdid, uns uint32_t data1_version = 0; uint32_t data2_offset = 0; uint32_t data2_size = 0; - uint32_t toc_offset = be32toh(uarp_hdr->toc_offset); uint32_t toc_size = be32toh(uarp_hdr->toc_size); const unsigned char* p = uarp_fw + uarp_hdr_size; while (p < (const unsigned char*)uarp_fw + toc_size) { diff --git a/src/common.c b/src/common.c index 4c99a3a..70f0742 100644 --- a/src/common.c +++ b/src/common.c @@ -264,7 +264,6 @@ int prompt_user(const char* title, const char* text) int titlelen = (title) ? strlen(title) : 0; if (titlelen > 0) { int lefttitlelen = (titlelen+4)/2; - int righttitlelen = titlelen+4 - lefttitlelen; int leftpounds = outerlen/2 - lefttitlelen; int rightpounds = outerlen-(titlelen+4) - leftpounds; printf("%.*s[ %.*s ]%.*s\n", leftpounds, POUNDS, titlelen, title, rightpounds, POUNDS); diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 7be50ea..1465f87 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -1772,7 +1772,6 @@ int main(int argc, char* argv[]) char* ipsw = NULL; int ipsw_info = 0; int result = 0; - int is_terminal = 0; const char* logfile = NULL; logger_set_print_func(tty_print); @@ -1804,7 +1803,6 @@ int main(int argc, char* argv[]) client->flags &= ~FLAG_INTERACTIVE; } else { client->flags |= FLAG_INTERACTIVE; - is_terminal = 1; } #ifdef HAVE_LIMERA1N @@ -2834,7 +2832,6 @@ int extract_component(ipsw_archive_t ipsw, const char* path, void** component_da int personalize_component(struct idevicerestore_client_t* client, const char *component_name, const void* component_data, size_t component_size, plist_t tss_response, void** personalized_component, size_t* personalized_component_size) { void* component_blob = NULL; - size_t component_blob_size = 0; void* stitched_component = NULL; size_t stitched_component_size = 0; @@ -115,11 +115,11 @@ void logger(enum loglevel level, const char *fmt, ...) snprintf(fs, 24, "%02d:%02d:%02d.%03d", lt.wHour, lt.wMinute, lt.wSecond, lt.wMilliseconds); #else struct timeval ts; - struct tm tp_; struct tm *tp; gettimeofday(&ts, NULL); #ifdef HAVE_LOCALTIME_R + struct tm tp_; tp = localtime_r(&ts.tv_sec, &tp_); #else tp = localtime(&ts.tv_sec); |