1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

src: silence clang-15 compiler warnings

This commit is contained in:
Markus F.X.J. Oberhumer 2022-09-16 16:31:34 +02:00
parent 73c816e468
commit 63298ebd6d
5 changed files with 6 additions and 1 deletions

View File

@ -131,7 +131,8 @@ if(MSVC)
target_compile_options(${t} PRIVATE -DHAVE_STDARG_H -DHAVE_VSNPRINTF -J -W3 ${warn_WX})
else()
target_compile_options(${t} PRIVATE -DHAVE_STDARG_H -DHAVE_UNISTD_H -DHAVE_VSNPRINTF)
target_compile_options(${t} PRIVATE -Wall -Wextra -Wvla ${warn_Werror})
# clang-15: -Wno-strict-prototypes is needed to silence the new -Wdeprecated-non-prototype warning
target_compile_options(${t} PRIVATE -Wall -Wextra -Wvla -Wno-strict-prototypes ${warn_Werror})
endif()
set(t upx)

View File

@ -129,6 +129,7 @@ static int F(Filter *f)
#if 0 || defined(TESTING)
printf("\ncalls=%d noncalls=%d noncalls2=%d text_size=%x calltrickoffset=%x\n",calls,noncalls,noncalls2,size,cto);
#endif
UNUSED(noncalls2);
return 0;
}

View File

@ -128,6 +128,7 @@ static int F(Filter *f)
#if 0 || defined(TESTING)
printf("\ncalls=%d noncalls=%d noncalls2=%d text_size=%x calltrickoffset=%x\n",calls,noncalls,noncalls2,size,cto);
#endif
UNUSED(noncalls2);
return 0;
}

View File

@ -254,6 +254,7 @@ static int F(Filter *f)
calls,noncalls,noncalls2,size,cto8);
printf("CALL/JMP/JCC %d %d %d\n",wtally[0],wtally[1],wtally[2]);
#endif
UNUSED(noncalls2);
return 0;
}

View File

@ -129,6 +129,7 @@ static int F(Filter *f)
#if 0 || defined(TESTING)
printf("\ncalls=%d noncalls=%d noncalls2=%d text_size=%x calltrickoffset=%x\n",calls,noncalls,noncalls2,size,cto);
#endif
UNUSED(noncalls2);
return 0;
}