From 56ee4a1af272d3f7a8f4e62cb419af17fa69f4aa Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 2 May 2021 02:02:05 +0200 Subject: [PATCH] AK: Silence -Wmaybe-uninitialized warning Adding -fno-semantic-interposition to the GCC command line caused this new warning. I don't see how output.data() could be uninitialized here. Also, commenting out the ensure_capacity() call for the Vector also gets rid of this warning. --- AK/Base64.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AK/Base64.cpp b/AK/Base64.cpp index 3294433d96a..5df2eebac99 100644 --- a/AK/Base64.cpp +++ b/AK/Base64.cpp @@ -87,7 +87,10 @@ ByteBuffer decode_base64(const StringView& input) output.append(out2); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" return ByteBuffer::copy(output.data(), output.size()); +#pragma GCC diagnostic pop } String encode_base64(ReadonlyBytes input)