summaryrefslogtreecommitdiff
path: root/test/byte-stream-buffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/byte-stream-buffer.cpp')
-rw-r--r--test/byte-stream-buffer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/byte-stream-buffer.cpp b/test/byte-stream-buffer.cpp
index d606f146..04ff0571 100644
--- a/test/byte-stream-buffer.cpp
+++ b/test/byte-stream-buffer.cpp
@@ -20,7 +20,12 @@ class ByteStreamBufferTest : public Test
protected:
int run()
{
- std::array<uint8_t, 100> data;
+ /*
+ * gcc 11.1.0 incorrectly raises a maybe-uninitialized warning
+ * when calling data.size() below (if the address sanitizer is
+ * disabled). Silence it by initializing the array.
+ */
+ std::array<uint8_t, 100> data = {};
unsigned int i;
uint32_t value;
int ret;