mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
uninitialized.UndefReturn
This commit is contained in:
parent
d23e4a12e7
commit
faa9e7549f
@ -796,6 +796,9 @@ public:
|
||||
explicit prop_map(value_type P_of::*m_in) : member(m_in) { }
|
||||
|
||||
reference operator[](key_type k) const {
|
||||
if (k.raw() == nullptr || &(k.raw()->props) == nullptr) {
|
||||
throw std::invalid_argument("Invalid key");
|
||||
}
|
||||
return k.raw()->props.*member;
|
||||
}
|
||||
reference operator()(key_type k) const { return (*this)[k]; }
|
||||
|
@ -58,6 +58,9 @@ u32 unaligned_load_u32(const void *ptr) {
|
||||
/// Perform an unaligned 64-bit load
|
||||
static really_inline
|
||||
u64a unaligned_load_u64a(const void *ptr) {
|
||||
if (ptr == NULL) {
|
||||
return 0; // Return a default value
|
||||
}
|
||||
struct unaligned { u64a u; } PACKED__MAY_ALIAS;
|
||||
// cppcheck-suppress cstyleCast
|
||||
const struct unaligned *uptr = (const struct unaligned *)ptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user