diff options
Diffstat (limited to 'test/byte-stream-buffer.cpp')
-rw-r--r-- | test/byte-stream-buffer.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/byte-stream-buffer.cpp b/test/byte-stream-buffer.cpp index bc1d462e..04aab3d2 100644 --- a/test/byte-stream-buffer.cpp +++ b/test/byte-stream-buffer.cpp @@ -2,13 +2,14 @@ /* * Copyright (C) 2018, Google Inc. * - * byte_stream_buffer.cpp - ByteStreamBuffer tests + * ByteStreamBuffer tests */ #include <array> #include <iostream> -#include "byte_stream_buffer.h" +#include "libcamera/internal/byte_stream_buffer.h" + #include "test.h" using namespace std; @@ -19,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; |