Jelajahi Sumber

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 <marcus.haehnel@kernkonzept.com>
Frank Mehnert 9 bulan lalu
induk
melakukan
8c9dc43f47
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      ldso/ldso/ldso.c

+ 1 - 1
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;