Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang warnings -Wmissing-braces #17867

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Apr 28, 2022

Problem

../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp:789:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
    gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO]           = { 0 };
                                                              ^
                                                              {}
../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp:790:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
    gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { 0 };
                                                              ^
                                                              {}
2 errors generated.

Change overview

Add the requested braces.

Testing

Compile examples/lighting-app/nxp/k32w/k32w0 with clang

../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp:789:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
    gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO]           = { 0 };
                                                              ^
                                                              {}
../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp:790:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
    gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { 0 };
                                                              ^
                                                              {}
2 errors generated.
@github-actions
Copy link

github-actions bot commented Apr 28, 2022

PR #17867: Size comparison from 2826b34 to 5022fb8

Full report (25 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2826b34 5022fb8 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 687979 687979 0 0.0
(read/write) 164268 164268 0 0.0
.bss 75228 75228 0 0.0
.data 3396 3396 0 0.0
.rodata 101507 101507 0 0.0
.text 585992 585992 0 0.0
lock-ftd LP_CC2652R7 (read only) 688795 688795 0 0.0
(read/write) 154756 154756 0 0.0
.bss 73588 73588 0 0.0
.data 3220 3220 0 0.0
.rodata 103171 103171 0 0.0
.text 585140 585140 0 0.0
lock-mtd LP_CC2652R7 (read only) 637539 637539 0 0.0
(read/write) 146388 146388 0 0.0
.bss 69308 69308 0 0.0
.data 3220 3220 0 0.0
.rodata 103051 103051 0 0.0
.text 533996 533996 0 0.0
pump-app LP_CC2652R7 (read only) 661559 661559 0 0.0
(read/write) 183192 183192 0 0.0
.bss 73764 73764 0 0.0
.data 3252 3252 0 0.0
.rodata 80351 80351 0 0.0
.text 580728 580728 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654511 654511 0 0.0
(read/write) 190032 190032 0 0.0
.bss 73812 73812 0 0.0
.data 3216 3216 0 0.0
.rodata 83383 83383 0 0.0
.text 570648 570648 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 626774 626774 0 0.0
.app_xip_area 529324 529324 0 0.0
.bss 80108 80108 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 621374 621374 0 0.0
.app_xip_area 525396 525396 0 0.0
.bss 78668 78668 0 0.0
.data 656 656 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 574482 574482 0 0.0
.app_xip_area 468860 468860 0 0.0
.bss 88016 88016 0 0.0
.data 568 568 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 907744 907744 0 0.0
(read/write) 135112 135112 0 0.0
.bss 133064 133064 0 0.0
.data 2044 2044 0 0.0
.text 907736 907736 0 0.0
BRD4161A+rpc (read only) 942112 942112 0 0.0
(read/write) 151792 151792 0 0.0
.bss 149544 149544 0 0.0
.data 2248 2248 0 0.0
.text 942104 942104 0 0.0
BRD4161A+rs911x (read only) 746060 746060 0 0.0
(read/write) 129344 129344 0 0.0
.bss 127372 127372 0 0.0
.data 1972 1972 0 0.0
.text 746052 746052 0 0.0
lock-app BRD4161A+wf200 (read only) 908716 908716 0 0.0
(read/write) 126300 126300 0 0.0
.bss 124380 124380 0 0.0
.data 1920 1920 0 0.0
.text 908708 908708 0 0.0
window-app BRD4161A (read only) 844952 844952 0 0.0
(read/write) 133200 133200 0 0.0
.bss 131240 131240 0 0.0
.data 1956 1956 0 0.0
.text 844944 844944 0 0.0
esp32 all-clusters-app c3devkit (read only) 999188 999188 0 0.0
(read/write) 1473778 1473778 0 0.0
.dram0.bss 68360 68360 0 0.0
.dram0.data 14428 14428 0 0.0
.flash.rodata 206536 206536 0 0.0
.flash.text 999188 999188 0 0.0
.iram0.text 62020 62020 0 0.0
m5stack (read only) 1054603 1054603 0 0.0
(read/write) 476200 476200 0 0.0
.dram0.bss 73880 73880 0 0.0
.dram0.data 34168 34168 0 0.0
.flash.rodata 236316 236316 0 0.0
.flash.text 1049219 1049219 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 688756 688756 0 0.0
.bss 81312 81312 0 0.0
.data 2000 2000 0 0.0
.text 599644 599644 0 0.0
lock k32w061+release (read/write) 729568 729568 0 0.0
.bss 81720 81720 0 0.0
.data 1960 1960 0 0.0
.text 640088 640088 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 8692644 8692644 0 0.0
(read/write) 616353 616353 0 0.0
.bss 40897 40897 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 555704 555704 0 0.0
.dynamic 560 560 0 0.0
.got 14744 14744 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 429764 429764 0 0.0
.text 6865444 6865444 0 0.0
thermostat-no-ble arm64 (read only) 2366924 2366924 0 0.0
(read/write) 174513 174513 0 0.0
.bss 86257 86257 0 0.0
.data 1488 1488 0 0.0
.data.rel.ro 79000 79000 0 0.0
.dynamic 560 560 0 0.0
.got 4736 4736 0 0.0
.init 24 24 0 0.0
.init_array 368 368 0 0.0
.rodata 145980 145980 0 0.0
.text 1991888 1991888 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2411276 2411276 0 0.0
.bss 205860 205860 0 0.0
.data 5848 5848 0 0.0
.text 1373876 1373876 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1179303 1179303 0 0.0
bss 141992 141992 0 0.0
rodata 150104 150104 0 0.0
text 808520 808520 0 0.0
p6 all-clusters-app default (read/write) 2526824 2526824 0 0.0
.bss 139248 139248 0 0.0
.data 2784 2784 0 0.0
.text 1485088 1485088 0 0.0
light-app default (read/write) 2418752 2418752 0 0.0
.bss 132720 132720 0 0.0
.data 2584 2584 0 0.0
.text 1377016 1377016 0 0.0
lock-app default (read/write) 2422832 2422832 0 0.0
.bss 132520 132520 0 0.0
.data 2544 2544 0 0.0
.text 1381096 1381096 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 807568 807568 0 0.0
bss 75424 75424 0 0.0
noinit 40416 40416 0 0.0
text 571306 571306 0 0.0

@kghost kghost merged commit 665b11c into project-chip:master Apr 29, 2022
@mspang mspang deleted the for-chip/clang-warnings8 branch April 29, 2022 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants