Skip to content

Commit

Permalink
Attempt at fixing unitialized warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Oct 13, 2023
1 parent 6fb9f44 commit 6eb0ced
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ project(capstone
if (MSVC)
add_compile_options(/W1 /w14189)
else()
add_compile_options(-Werror -Wshift-negative-value -Wreturn-type -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context -Wmisleading-indentation)
add_compile_options(-Werror -Wmaybe-uninitialized -Wshift-negative-value -Wreturn-type -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context -Wmisleading-indentation)
endif()


Expand Down
3 changes: 3 additions & 0 deletions arch/AArch64/AArch64AddressingModes.h
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@ static inline uint64_t AArch64_AM_decodeAdvSIMDModImmType12(uint8_t Imm)
return (EncVal << 32) | EncVal;
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
/// Returns true if Imm is the concatenation of a repeating pattern of type T.
#define DEFINE_isSVEMaskOfIdenticalElements(T) \
static inline bool CONCAT(AArch64_AM_isSVEMaskOfIdenticalElements, T)(int64_t Imm) \
Expand All @@ -837,6 +839,7 @@ DEFINE_isSVEMaskOfIdenticalElements(int8_t);
DEFINE_isSVEMaskOfIdenticalElements(int16_t);
DEFINE_isSVEMaskOfIdenticalElements(int32_t);
DEFINE_isSVEMaskOfIdenticalElements(int64_t);
#pragma GCC diagnostic pop

static inline bool AArch64_AM_isSVEMaskOfIdenticalElements64(int64_t Imm)
{
Expand Down

0 comments on commit 6eb0ced

Please sign in to comment.