diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00a4261f..1f2d94a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -681,7 +681,7 @@ jobs: [[ $ZIG_TARGET == mips-linux-musleabihf-* ]] && ZIG_TARGET=mips-linux-musleabihf [[ $ZIG_TARGET == mipsel-linux-musleabi-* ]] && ZIG_TARGET=mipsel-linux-musleabi [[ $ZIG_TARGET == mipsel-linux-musleabihf-* ]] && ZIG_TARGET=mipsel-linux-musleabihf - ZIG_TARGET=${ZIG_TARGET/i386-/x86-} # i386 => x86 + ZIG_TARGET=${ZIG_TARGET/#i386-/x86-} # i386 => x86 echo "ZIG_TARGET=$ZIG_TARGET" >> $GITHUB_ENV # update ZIG_FLAGS # -fPIE is for compilation only => also use the correct linker flag "-pie" diff --git a/.github/workflows/github-close-stale-issues.yml b/.github/workflows/github-close-stale-issues.yml index 1a32d433..52805fdd 100644 --- a/.github/workflows/github-close-stale-issues.yml +++ b/.github/workflows/github-close-stale-issues.yml @@ -25,7 +25,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: operations-per-run: 300 exempt-all-milestones: true diff --git a/misc/cmake/print_info.cmake b/misc/cmake/print_info.cmake index 68ddc1cd..d286b3ae 100644 --- a/misc/cmake/print_info.cmake +++ b/misc/cmake/print_info.cmake @@ -42,7 +42,7 @@ function(upx_print_info) upx_print_var(CMAKE_${lang}_COMPILER_ID) upx_print_var(CMAKE_${lang}_SIMULATE_ID) upx_print_var(CMAKE_${lang}_COMPILER_VERSION) - upx_print_var(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT ) + upx_print_var(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT) upx_print_var(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID) upx_print_var(CMAKE_${lang}_PLATFORM_ID) upx_print_var(CMAKE_${lang}_COMPILER_ABI) diff --git a/src/check/dt_check.cpp b/src/check/dt_check.cpp index 44187bbc..34ad036d 100644 --- a/src/check/dt_check.cpp +++ b/src/check/dt_check.cpp @@ -1101,7 +1101,7 @@ void upx_compiler_sanity_check(void) noexcept { assert_noexcept(TestBELE::test()); assert_noexcept(TestBELE::test()); { - alignas(16) static constexpr byte dd[32] = { + alignas(16) static constexpr const byte dd[32] = { 0, 0, 0, 0, 0, 0, 0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0, 0, 0, 0, 0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a, 0x79, 0x78, 0, 0, 0, 0, 0}; constexpr const byte *d = dd + 7; diff --git a/src/check/dt_cxxlib.cpp b/src/check/dt_cxxlib.cpp index 371616ef..7c5ffc6d 100644 --- a/src/check/dt_cxxlib.cpp +++ b/src/check/dt_cxxlib.cpp @@ -770,7 +770,7 @@ static_assert(sizeof(TestCT) == 8); static_assert(alignof(TestCT) == 1); } // namespace -TEST_CASE("upx::compile_time") { +TEST_CASE("upx::compile_time 1") { constexpr upx_uint16_t v16 = 0x0201; constexpr upx_uint32_t v24 = 0x030201; constexpr upx_uint32_t v32 = 0x04030201; @@ -867,7 +867,7 @@ TEST_CASE("upx::compile_time") { constexpr auto le64 = TestCT::makeLE64(v64); static_assert(upx::compile_time::get_le64(le64.d) == v64); static_assert(mem_eq(le64.d, "\x01\x02\x03\x04\x05\x06\x07\x08", 8)); - memset(buf, 0, 8); + upx::compile_time::mem_clear(buf, 8); TestCT::noinline_set_le64(buf, v64); assert_noexcept(TestCT::noinline_get_le64(buf) == v64); assert_noexcept(upx::compile_time::get_le64(buf) == v64); @@ -888,7 +888,7 @@ TEST_CASE("upx::compile_time") { } } -TEST_CASE("upx::compile_time") { +TEST_CASE("upx::compile_time 2") { constexpr upx_uint16_t v16 = 0xf2f1; constexpr upx_uint32_t v24 = 0xf3f2f1; constexpr upx_uint32_t v32 = 0xf4f3f2f1; diff --git a/src/packmast.cpp b/src/packmast.cpp index 657f197c..05c451fb 100644 --- a/src/packmast.cpp +++ b/src/packmast.cpp @@ -25,6 +25,8 @@ */ +// dispatch to a concrete subclass of class PackerBase; see work.cpp + #include "conf.h" #include "file.h" #include "packmast.h" @@ -56,7 +58,7 @@ #include "p_wince_arm.h" /************************************************************************* -// dispatch to a concrete subclass of class PackerBase; see work.cpp +// **************************************************************************/ PackMaster::PackMaster(InputFile *f, Options *o) noexcept : fi(f) { diff --git a/src/util/cxxlib.h b/src/util/cxxlib.h index a95a215b..c39e09e9 100644 --- a/src/util/cxxlib.h +++ b/src/util/cxxlib.h @@ -384,10 +384,10 @@ inline constexpr bool is_bounded_array_v = is_bounded_array::value; template struct is_same_all : public std::conjunction...> {}; template -inline constexpr bool is_same_all_v = is_same_all::value; -template struct is_same_any : public std::disjunction...> {}; template +inline constexpr bool is_same_all_v = is_same_all::value; +template inline constexpr bool is_same_any_v = is_same_any::value; // remove_cvref from C++20 diff --git a/src/util/membuffer.h b/src/util/membuffer.h index bcdb4754..26c791ea 100644 --- a/src/util/membuffer.h +++ b/src/util/membuffer.h @@ -237,6 +237,7 @@ private: #endif }; static Stats stats; + #if DEBUG // debugging aid struct Debug { diff --git a/src/util/system_undefs.h b/src/util/system_undefs.h index f750f149..30ac7efd 100644 --- a/src/util/system_undefs.h +++ b/src/util/system_undefs.h @@ -48,6 +48,7 @@ #undef i386 #undef large #undef linux +#undef mc68000 #undef mips #undef near #undef powerpc