Some warning fixes

This commit is contained in:
Jeremy 2023-10-04 13:09:45 -04:00
parent e28cda9a35
commit b80026596f
No known key found for this signature in database
GPG Key ID: 3E11861CB34E158C
2 changed files with 5 additions and 1 deletions

View File

@ -458,7 +458,8 @@ namespace libdwarf {
&table_count,
&line_context
);
VERIFY(table_count >= 0 && table_count <= 2, "Unknown dwarf line table count");
static_assert(std::is_unsigned<decltype(table_count)>::value, "Expected unsigned Dwarf_Small");
VERIFY(/*table_count >= 0 &&*/ table_count <= 2, "Unknown dwarf line table count");
if(ret == DW_DLV_NO_ENTRY) {
// TODO: Failing silently for now
return;

View File

@ -21,6 +21,8 @@
namespace cpptrace {
namespace detail {
#pragma warning(push)
#pragma warning(disable: 4740) // warning C4740: flow in or out of inline asm code suppresses global optimization
CPPTRACE_FORCE_NO_INLINE
std::vector<uintptr_t> capture_frames(size_t skip, size_t max_depth) {
skip++;
@ -135,6 +137,7 @@ namespace detail {
}
return trace;
}
#pragma warning(pop)
}
}