Bug 1181922

Summary: GCC 11: qemu package fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Liška <martin.liska>
Component: BasesystemAssignee: E-mail List <kvm-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: brogers
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1181859    

Description Martin Liška 2021-02-08 07:56:33 UTC
The package fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/qemu/standard/x86_64

due to:
[ 3143s] In function 'ath5k_eeprom_read_turbo_modes',
[ 3143s]     inlined from 'ath5k_eeprom_init_modes' at drivers/net/ath/ath5k/ath5k_eeprom.c:488:9,
[ 3143s]     inlined from 'ath5k_eeprom_init' at drivers/net/ath/ath5k/ath5k_eeprom.c:1701:8:
[ 3143s] drivers/net/ath/ath5k/ath5k_eeprom.c:421:65: error: 'val' may be used uninitialized [-Werror=maybe-uninitialized]
[ 3143s]   421 |                 ee->ee_switch_settling_turbo[mode] = (val >> 6) & 0x7f;
[ 3143s]       |                                                      ~~~~~~~~~~~^~~~~~
[ 3143s] drivers/net/ath/ath5k/ath5k_eeprom.c: In function 'ath5k_eeprom_init':
[ 3143s] drivers/net/ath/ath5k/ath5k_eeprom.c:413:13: note: 'val' declared here
[ 3143s]   413 |         u16 val;
[ 3143s]       |             ^~~
[ 3143s] In function 'ath5k_eeprom_read_turbo_modes',
[ 3143s]     inlined from 'ath5k_eeprom_init_modes' at drivers/net/ath/ath5k/ath5k_eeprom.c:488:9,
[ 3143s]     inlined from 'ath5k_eeprom_init' at drivers/net/ath/ath5k/ath5k_eeprom.c:1701:8:
[ 3143s] drivers/net/ath/ath5k/ath5k_eeprom.c:437:65: error: 'val' may be used uninitialized [-Werror=maybe-uninitialized]
[ 3143s]   437 |                 ee->ee_switch_settling_turbo[mode] = (val >> 8) & 0x7f;
[ 3143s]       |                                                      ~~~~~~~~~~~^~~~~~
[ 3143s] drivers/net/ath/ath5k/ath5k_eeprom.c: In function 'ath5k_eeprom_init':
[ 3143s] drivers/net/ath/ath5k/ath5k_eeprom.c:413:13: note: 'val' declared here
[ 3143s]   413 |         u16 val;
[ 3143s]       |             ^~~
Comment 1 Bruce Rogers 2021-02-10 04:13:06 UTC
This code is broken all right.
Comment 2 Bruce Rogers 2021-02-16 18:40:29 UTC
I sent a fix to upstream iPXE project, and will include it in next qemu submission to Factory, hopefully today.
Comment 4 Martin Liška 2021-03-05 08:14:44 UTC
Thanks for the fix, but there are more errors later in the build:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/qemu/standard/x86_64

[ 2047s] brotli/c/dec/decode.c:2033:41: error: argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Werror=vla-parameter]
[ 2047s]  2033 |     size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
[ 2047s]       |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
[ 2047s] In file included from brotli/c/dec/decode.c:7:
[ 2047s] ./brotli/c/include/brotli/decode.h:204:19: note: previously declared as a variable length array 'const uint8_t[*decoded_size]' {aka 'const unsigned char[*decoded_size]'}
[ 2047s]   204 |     const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
[ 2047s]       |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 2047s] brotli/c/dec/decode.c:2034:14: error: argument 4 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Werror=vla-parameter]
[ 2047s]  2034 |     uint8_t* decoded_buffer) {
[ 2047s]       |     ~~~~~~~~~^~~~~~~~~~~~~~
[ 2047s] In file included from brotli/c/dec/decode.c:7:
[ 2047s] ./brotli/c/include/brotli/decode.h:206:13: note: previously declared as a variable length array 'uint8_t[encoded_size]' {aka 'unsigned char[encoded_size]'}
[ 2047s]   206 |     uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]);
[ 2047s]       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 5 Bruce Rogers 2021-03-05 14:47:12 UTC
I branched the project and will resolve all the remaining issues.
Comment 6 Bruce Rogers 2021-03-05 21:29:06 UTC
OK, I've got all the GCC 11 failures fixed now. I'll check in soon.
Comment 7 OBSbugzilla Bot 2021-03-17 14:10:13 UTC
This is an autogenerated message for OBS integration:
This bug (1181922) was mentioned in
https://build.opensuse.org/request/show/879687 Factory / qemu
Comment 9 Martin Liška 2021-05-17 09:19:09 UTC
(In reply to Martin Liška from comment #4)
> Thanks for the fix, but there are more errors later in the build:
> https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:
> Gcc7/qemu/standard/x86_64
> 
> [ 2047s] brotli/c/dec/decode.c:2033:41: error: argument 2 of type 'const
> uint8_t *' {aka 'const unsigned char *'} declared as a pointer
> [-Werror=vla-parameter]
> [ 2047s]  2033 |     size_t encoded_size, const uint8_t* encoded_buffer,
> size_t* decoded_size,
> [ 2047s]       |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
> [ 2047s] In file included from brotli/c/dec/decode.c:7:
> [ 2047s] ./brotli/c/include/brotli/decode.h:204:19: note: previously
> declared as a variable length array 'const uint8_t[*decoded_size]' {aka
> 'const unsigned char[*decoded_size]'}
> [ 2047s]   204 |     const uint8_t
> encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
> [ 2047s]       |    
> ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [ 2047s] brotli/c/dec/decode.c:2034:14: error: argument 4 of type 'uint8_t
> *' {aka 'unsigned char *'} declared as a pointer [-Werror=vla-parameter]
> [ 2047s]  2034 |     uint8_t* decoded_buffer) {
> [ 2047s]       |     ~~~~~~~~~^~~~~~~~~~~~~~
> [ 2047s] In file included from brotli/c/dec/decode.c:7:
> [ 2047s] ./brotli/c/include/brotli/decode.h:206:13: note: previously
> declared as a variable length array 'uint8_t[encoded_size]' {aka 'unsigned
> char[encoded_size]'}
> [ 2047s]   206 |     uint8_t
> decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]);
> [ 2047s]       |    
> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This warning is still there, fixed with:
https://github.com/google/brotli/pull/893

I'm going to include the patch.
Comment 10 Martin Liška 2021-05-17 09:32:01 UTC
I've just made SR#893662.
Comment 11 OBSbugzilla Bot 2021-05-17 16:30:14 UTC
This is an autogenerated message for OBS integration:
This bug (1181922) was mentioned in
https://build.opensuse.org/request/show/893798 Factory / qemu
Comment 12 Martin Liška 2021-05-18 07:03:00 UTC
Fixed now.