소스 검색

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;