From 8c9dc43f47ec4f2ab69f5092875638f68659fc8d Mon Sep 17 00:00:00 2001 From: Frank Mehnert Date: Mon, 29 Jul 2024 13:57:40 +0200 Subject: ldso.c: use 'unsigned int' as loop variable type As the condition for terminating the loop compares the loop variable against an ElfW() variable which is, depending on the platform, either uint32_t or uint64_t, use 'unsigned int' rather than 'int' for the loop variable to prevent corresponding compiler warnings. Note that it would not make sense to use 'unsigned long' because the number of program headers will never exceed 32-bit. Signed-off-by: Marcus Haehnel --- ldso/ldso/ldso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldso') diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 435bd43bc..e866d6418 100755 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -682,7 +682,7 @@ of this helper program; chances are you did not intend to run this program.\n\ */ /* Now cover the application program. */ if (app_tpnt->dynamic_info[DT_TEXTREL]) { - int j; + unsigned int j; ElfW(Phdr) *ppnt_outer = ppnt; _dl_debug_early("calling mprotect on the application program\n"); ppnt = (ElfW(Phdr) *) _dl_auxvt[AT_PHDR].a_un.a_val; -- cgit v1.2.3