all: pacify clang-tidy, CI and cmake updates
This commit is contained in:
@@ -261,8 +261,8 @@ struct Z2_X2 : public X2 {
|
||||
**************************************************************************/
|
||||
|
||||
TEST_CASE("Deleter") {
|
||||
LE16 *o = {}; // object
|
||||
LE32 *a = {}; // array
|
||||
LE16 *o = nullptr; // object
|
||||
LE32 *a = nullptr; // array
|
||||
{
|
||||
const upx::ObjectDeleter<LE16 **> o_deleter{&o, 1};
|
||||
o = new LE16;
|
||||
|
||||
@@ -1239,6 +1239,7 @@ void PeFile::Export::build(char *newbase, unsigned newoffs) {
|
||||
|
||||
edir.addrtable = newoffs + ptr_diff_bytes(functionp, newbase);
|
||||
edir.ordinaltable = newoffs + ptr_diff_bytes(ordinalp, newbase);
|
||||
assert(ordinals != nullptr); // pacify clang-tidy
|
||||
memcpy(ordinalp, ordinals, 2 * edir.names);
|
||||
|
||||
edir.name = newoffs + ptr_diff_bytes(enamep, newbase);
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ forceinline Result ptr_static_cast(const From *ptr) noexcept {
|
||||
return static_cast<Result>(static_cast<const void *>(ptr));
|
||||
}
|
||||
|
||||
// helper classes so we don't leak memory on exceptions
|
||||
// helper classes so we don't leak memory on exceptions; NOT thread-safe
|
||||
template <class T> // T is "Type **"
|
||||
struct ObjectDeleter final {
|
||||
static_assert(std::is_pointer_v<T>);
|
||||
|
||||
Reference in New Issue
Block a user