From 5c3df7e7a510ad88ded0f05d210504218b9e6172 Mon Sep 17 00:00:00 2001 From: rhjdvsgsgks <26178113+rhjdvsgsgks@users.noreply.github.com> Date: Sun, 26 Feb 2023 14:08:50 +0000 Subject: [PATCH] kernel: make some compiler happy again (#279) https://github.com/tiann/KernelSU/commit/e743722449147e3549fe282cf82994ec4518390b still not fix #252 --- kernel/apk_sign.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/apk_sign.c b/kernel/apk_sign.c index 94532e07..04c0a36a 100644 --- a/kernel/apk_sign.c +++ b/kernel/apk_sign.c @@ -93,7 +93,7 @@ check_v2_signature(char *path, unsigned expected_size, unsigned expected_hash) #if 0 int hash = 1; signed char c; - for (unsigned i = 0; i < size4; ++i) { + for (i = 0; i < size4; ++i) { ksu_kernel_read_compat(fp, &c, 0x1, &pos); hash = 31 * hash + c; } @@ -103,7 +103,7 @@ check_v2_signature(char *path, unsigned expected_size, unsigned expected_hash) if (size4 == expected_size) { int hash = 1; signed char c; - for (unsigned i = 0; i < size4; ++i) { + for (i = 0; i < size4; ++i) { ksu_kernel_read_compat(fp, &c, 0x1, &pos); hash = 31 * hash + c; } @@ -177,4 +177,4 @@ int is_manager_apk(char *path) return check_v2_signature(path, EXPECTED_SIZE, EXPECTED_HASH); } -#endif \ No newline at end of file +#endif