瀏覽代碼

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 月之前
父節點
當前提交
8c9dc43f47
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;