Quick fixes

This commit is contained in:
Jeremy 2023-09-19 18:52:52 -04:00
parent 36174f9216
commit 5d3755353f
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ namespace detail {
FILE* file,
bool is_little_endian
) {
static_assert(Bits == 32 || Bits == 64);
static_assert(Bits == 32 || Bits == 64, "Unexpected Bits argument");
using Header = typename std::conditional<Bits == 32, Elf32_Ehdr, Elf64_Ehdr>::type;
using PHeader = typename std::conditional<Bits == 32, Elf32_Phdr, Elf64_Phdr>::type;
Header file_header = load_bytes<Header>(file, 0);

View File

@ -69,7 +69,7 @@ namespace detail {
template<std::size_t Bits>
static uintptr_t macho_get_text_vmaddr_mach(FILE* obj_file, off_t offset, bool is_64, bool should_swap) {
static_assert(Bits == 32 || Bits == 64);
static_assert(Bits == 32 || Bits == 64, "Unexpected Bits argument");
using Mach_Header = typename std::conditional<Bits == 32, mach_header, mach_header_64>::type;
using Segment_Command = typename std::conditional<Bits == 32, segment_command, segment_command_64>::type;
uint32_t ncmds;
@ -101,7 +101,7 @@ namespace detail {
actual_offset += cmd.cmdsize;
}
// somehow no __TEXT section was found...
CPPTRACE_VERIFY(false, "Couldn't find __TEXT section while parsing Mach-O object")
CPPTRACE_VERIFY(false, "Couldn't find __TEXT section while parsing Mach-O object");
return 0;
}

View File

@ -382,7 +382,7 @@ namespace detail {
>::type = 0
>
raii_wrapper<T, D> raii_wrap(T&& obj, D deleter) {
return {std::move(obj), deleter};
return raii_wrapper<T, D>(std::move(obj), deleter);
}
inline void file_deleter(FILE* ptr) {