all: bump version; cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-05-28 14:06:11 +02:00
parent efeffc6e01
commit dae45ae0d4
19 changed files with 202 additions and 202 deletions
+26 -13
View File
@@ -170,19 +170,35 @@ struct CheckIntegral {
U a = {};
const U b = {};
static constexpr U c = {};
U x[2] = {};
const U y[2] = {};
static constexpr U z[2] = {};
};
template <class U>
static void checkU(void) {
U a = {};
const U b = {};
constexpr U c = {};
assert(a == 0);
assert(b == 0);
assert(c == 0);
TestU<U> t;
assert(t.a == 0);
assert(t.b == 0);
assert(t.c == 0);
{
U a = {};
const U b = {};
constexpr U c = {};
U x[2] = {};
const U y[2] = {};
constexpr U z[2] = {};
assert(a == 0);
assert(b == 0);
assert(c == 0);
assert(x[0] == 0 && x[1] == 0);
assert(y[0] == 0 && y[1] == 0);
assert(z[0] == 0 && z[1] == 0);
}
{
TestU<U> t;
assert(t.a == 0);
assert(t.b == 0);
assert(t.c == 0);
assert(t.x[0] == 0 && t.x[1] == 0);
assert(t.y[0] == 0 && t.y[1] == 0);
assert(t.z[0] == 0 && t.z[1] == 0);
}
#if __cplusplus < 202002L
COMPILE_TIME_ASSERT(std::is_pod<U>::value) // std::is_pod is deprecated in C++20
#endif
@@ -230,9 +246,6 @@ struct TestBELE {
static noinline bool test(void) {
CheckIntegral<T>::check();
CheckAlignment<T>::check();
// array init
T array[2] = {};
assert(array[0] == 0 && array[1] == 0);
// arithmetic checks (modern compilers will optimize this away)
T allbits = {};
assert(allbits == 0);
+9 -2
View File
@@ -206,14 +206,21 @@ error:
// compress - cruft because of pseudo-COM layer
**************************************************************************/
// ensure proper nullptr usage
#include <cstddef>
#undef NULL
#define NULL nullptr
#if defined(__GNUC__)
#undef __null
#define __null nullptr
#endif
#undef MSDOS
#undef OS2
#undef _WIN32
#undef _WIN32_WCE
#undef COMPRESS_MF_MT
#undef _NO_EXCEPTIONS
#undef NULL
#define NULL nullptr
#include <lzma-sdk/C/Common/MyInitGuid.h>
// #include <lzma-sdk/C/7zip/Compress/LZMA/LZMADecoder.h>
#include <lzma-sdk/C/7zip/Compress/LZMA/LZMAEncoder.h>
-4
View File
@@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_P_COM_H__
#define UPX_P_COM_H__ 1
/*************************************************************************
// dos/com
@@ -60,6 +58,4 @@ protected:
virtual void patchLoader(OutputFile *fo, byte *, int, unsigned);
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */
-4
View File
@@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_P_EXE_H__
#define UPX_P_EXE_H__ 1
/*************************************************************************
// dos/exe
@@ -104,6 +102,4 @@ protected:
bool use_clear_dirty_stack = false;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */
-4
View File
@@ -30,8 +30,6 @@
*/
#pragma once
#ifndef UPX_P_PS1_H__
#define UPX_P_PS1_H__ 1
/*************************************************************************
// ps1/exe
@@ -126,6 +124,4 @@ protected:
unsigned fdata_size;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */
-4
View File
@@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_P_SYS_H__
#define UPX_P_SYS_H__ 1
/*************************************************************************
// dos/sys
@@ -51,6 +49,4 @@ protected: // dos/com overrides
virtual void patchLoader(OutputFile *fo, byte *, int, unsigned) override;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */
-4
View File
@@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_P_TMT_H__
#define UPX_P_TMT_H__ 1
/*************************************************************************
// tmt/adam
@@ -75,6 +73,4 @@ protected:
tmt_header_t ih, oh;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */
+1 -1
View File
@@ -1,4 +1,4 @@
/* p_tos.cpp --
/* p_tos.cpp -- atari/tos executable format
This file is part of the UPX executable compressor.
+1 -5
View File
@@ -1,4 +1,4 @@
/* p_tos.h --
/* p_tos.h -- atari/tos executable format
This file is part of the UPX executable compressor.
@@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_P_TOS_H__
#define UPX_P_TOS_H__ 1
/*************************************************************************
// atari/tos
@@ -106,6 +104,4 @@ protected:
LinkerSymbols symbols;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */
+1 -1
View File
@@ -28,7 +28,7 @@
#pragma once
/*************************************************************************
//
// win32/pe (i386)
**************************************************************************/
class PackW32PeI386 final : public PeFile32 {
+1 -1
View File
@@ -28,7 +28,7 @@
#pragma once
/*************************************************************************
//
// win64/pe (amd64)
**************************************************************************/
class PackW64PeAmd64 final : public PeFile64 {
+3 -1
View File
@@ -28,7 +28,7 @@
#pragma once
/*************************************************************************
//
// win64/arm64
**************************************************************************/
class PackW64PeArm64 : public PeFile64 {
@@ -58,6 +58,8 @@ protected:
};
/*************************************************************************
// win64/arm64ec
//
// TODO: it is unclear yet if this should be made a subclass
// or just get merged into the base class using a flag;
// maybe the difference between arm64 and arm64ec does not really affect us
+1 -1
View File
@@ -28,7 +28,7 @@
#pragma once
/*************************************************************************
//
// wince/arm (Windows CE)
**************************************************************************/
class PackWinCeArm final : public PeFile32 {
+1 -1
View File
@@ -322,7 +322,7 @@ struct TestSortAllPermutations {
memcpy(a, perm, sizeof(*a) * n);
upx_stable_sort(a, n, sizeof(*a), le16_compare);
for (size_t i = 0; i < n; i++)
CHECK((a[i] == 255 + i));
assert((a[i] == 255 + i));
num_perms += 1;
} while (std::next_permutation(perm, perm + n));
return num_perms;
+5 -7
View File
@@ -1,8 +1,6 @@
#define UPX_VERSION_HEX 0x040003 /* 04.00.03 */
#define UPX_VERSION_STRING "4.0.3"
#define UPX_VERSION_STRING4 "4.03"
#define UPX_VERSION_DATE "May 19th 2023"
#define UPX_VERSION_DATE_ISO "2023-05-19"
#define UPX_VERSION_HEX 0x040100 /* 04.01.00 */
#define UPX_VERSION_STRING "4.1.0"
#define UPX_VERSION_STRING4 "4.10"
#define UPX_VERSION_DATE "May 28th 2023"
#define UPX_VERSION_DATE_ISO "2023-05-28"
#define UPX_VERSION_YEAR "2023"
/* vim:set ts=4 sw=4 et: */