2d7bf67d6a
- Fix GCC11 compiler issue in brotli (edk2) code (boo#1181922) brotli-fix-actual-variable-array-paramet.patch - Tweak a few submodule descriptions and summaries - Fix a backward compatibility issue in ACPI data i386-acpi-restore-device-paths-for-pre-5.patch OBS-URL: https://build.opensuse.org/request/show/877306 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=625
50 lines
2.2 KiB
Diff
50 lines
2.2 KiB
Diff
From: Bruce Rogers <brogers@suse.com>
|
|
Date: Fri, 5 Mar 2021 13:25:44 -0700
|
|
Subject: brotli: fix actual variable-array parameters to match declaration
|
|
|
|
References: boo#1181922
|
|
|
|
GCC 11 complains about the mismatch between the variable-array
|
|
parameters not being defined as such in the actual function definition.
|
|
Make them match.
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
c/dec/decode.c | 6 ++++--
|
|
c/enc/encode.c | 5 +++--
|
|
2 files changed, 7 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c
|
|
index 114c5057d7d91f5a634167e00d84..bb6f1ab6cc42f54720fd07f665e3 100644
|
|
--- a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c
|
|
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c
|
|
@@ -2030,8 +2030,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands(
|
|
}
|
|
|
|
BrotliDecoderResult BrotliDecoderDecompress(
|
|
- size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
|
|
- uint8_t* decoded_buffer) {
|
|
+ size_t encoded_size,
|
|
+ const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
|
|
+ size_t* decoded_size,
|
|
+ uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) {
|
|
BrotliDecoderState s;
|
|
BrotliDecoderResult result;
|
|
size_t total_out = 0;
|
|
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c
|
|
index 68548ef55af8036d6f0fe720e721..ab0a4906060c98461102d45ab61d 100644
|
|
--- a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c
|
|
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c
|
|
@@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream(
|
|
|
|
BROTLI_BOOL BrotliEncoderCompress(
|
|
int quality, int lgwin, BrotliEncoderMode mode, size_t input_size,
|
|
- const uint8_t* input_buffer, size_t* encoded_size,
|
|
- uint8_t* encoded_buffer) {
|
|
+ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],
|
|
+ size_t* encoded_size,
|
|
+ uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) {
|
|
BrotliEncoderState* s;
|
|
size_t out_size = *encoded_size;
|
|
const uint8_t* input_start = input_buffer;
|