Skip to content

Commit c2eb4ea

Browse files
Fix uninitialized member
1 parent c0bcdd6 commit c2eb4ea

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/support/small_vector.h

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,10 @@
3030

3131
namespace wasm {
3232

33-
// We don't understand this warning, only here and only on aarch64 and riscv64,
34-
// we suspect it's spurious so disabling for now.
35-
//
36-
// For context: https://github.com/WebAssembly/binaryen/issues/6311
37-
38-
#if defined(__aarch64__)
39-
#pragma GCC diagnostic push
40-
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
41-
#endif
42-
43-
// https://github.com/WebAssembly/binaryen/issues/6410
44-
#if defined(__riscv) && __riscv_xlen == 64
45-
#pragma GCC diagnostic push
46-
#pragma GCC diagnostic ignored "-Wuninitialized"
47-
#endif
48-
4933
template<typename T, size_t N> class SmallVector {
5034
// fixed-space storage
5135
size_t usedFixed = 0;
52-
std::array<T, N> fixed;
36+
std::array<T, N> fixed{};
5337

5438
// flexible additional storage
5539
std::vector<T> flexible;

0 commit comments

Comments
 (0)