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

[clang-tidy] Fix a clang-analyzer-nullability.NullablePassedToNonnull… #15586

Conversation

vivien-apple
Copy link
Contributor

… occurence in src/platform/Darwin/KeyValueStoreManagerImpl.mm

Problem

NSString methods used in KeyValueStoreManagerImpl.mm returns a nullable and we may end up passing a nullable to a method that expects non null. In practice it does not happens in the tree, but that sounds better to fix it just in case.

Change overview

  • Add nil checks

… occurence in src/platform/Darwin/KeyValueStoreManagerImpl.mm
@github-actions
Copy link

github-actions bot commented Feb 25, 2022

PR #15586: Size comparison from ff2866f to ef1f7da

Full report (45 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section ff2866f ef1f7da change % change
cyw30739 light cyw930739m2evb_01 (read/write) 599018 599018 0 0.0
.app_xip_area 503864 503864 0 0.0
.bss 77844 77844 0 0.0
.data 652 652 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 557102 557102 0 0.0
.app_xip_area 463484 463484 0 0.0
.bss 76348 76348 0 0.0
.data 616 616 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 577606 577606 0 0.0
.app_xip_area 474564 474564 0 0.0
.bss 85444 85444 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 915908 915908 0 0.0
(read/write) 128608 128608 0 0.0
.bss 126560 126560 0 0.0
.data 2048 2048 0 0.0
.text 915900 915900 0 0.0
BRD4161A+rpc (read only) 946004 946004 0 0.0
(read/write) 145548 145548 0 0.0
.bss 143336 143336 0 0.0
.data 2212 2212 0 0.0
.text 945996 945996 0 0.0
lock-app BRD4161A+wf200 (read only) 985812 985812 0 0.0
(read/write) 120360 120360 0 0.0
.bss 118436 118436 0 0.0
.data 1924 1924 0 0.0
.text 985804 985804 0 0.0
window-app BRD4161A (read only) 850000 850000 0 0.0
(read/write) 126840 126840 0 0.0
.bss 124920 124920 0 0.0
.data 1916 1916 0 0.0
.text 849992 849992 0 0.0
esp32 all-clusters-app c3devkit (read only) 952386 952386 0 0.0
(read/write) 1392858 1392858 0 0.0
.dram0.bss 62936 62936 0 0.0
.dram0.data 14172 14172 0 0.0
.flash.rodata 196848 196848 0 0.0
.flash.text 952386 952386 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 1002411 1002411 0 0.0
(read/write) 458336 458336 0 0.0
.dram0.bss 68080 68080 0 0.0
.dram0.data 34072 34072 0 0.0
.flash.rodata 224056 224056 0 0.0
.flash.text 997027 997027 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 691360 691360 0 0.0
.bss 77472 77472 0 0.0
.data 1924 1924 0 0.0
.text 606164 606164 0 0.0
lock k32w061+release (read/write) 694648 694648 0 0.0
.bss 77688 77688 0 0.0
.data 1964 1964 0 0.0
.text 609196 609196 0 0.0
linux all-clusters-app debug (read only) 2392225 2392225 0 0.0
(read/write) 144688 144688 0 0.0
.bss 59232 59232 0 0.0
.data 1360 1360 0 0.0
.data.rel.ro 78392 78392 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 204197 204197 0 0.0
.text 2025282 2025282 0 0.0
bridge-app debug+rpc (read only) 1718333 1718333 0 0.0
(read/write) 92736 92736 0 0.0
.bss 47552 47552 0 0.0
.data 2042 2042 0 0.0
.data.rel.ro 38088 38088 0 0.0
.dynamic 592 592 0 0.0
.got 3912 3912 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 141012 141012 0 0.0
.text 1461541 1461541 0 0.0
chip-tool debug (read only) 8994477 8994477 0 0.0
(read/write) 298488 298488 0 0.0
.bss 40384 40384 0 0.0
.data 1164 1164 0 0.0
.data.rel.ro 250872 250872 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 480533 480533 0 0.0
.text 7905493 7905493 0 0.0
chip-tool-ipv6only arm64 (read only) 8748812 8748812 0 0.0
(read/write) 411601 411601 0 0.0
.bss 58609 58609 0 0.0
.data 1216 1216 0 0.0
.data.rel.ro 296568 296568 0 0.0
.dynamic 560 560 0 0.0
.got 51408 51408 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 456676 456676 0 0.0
.text 7427684 7427684 0 0.0
door-lock-app debug (read only) 1933961 1933961 0 0.0
(read/write) 119128 119128 0 0.0
.bss 50496 50496 0 0.0
.data 1050 1050 0 0.0
.data.rel.ro 62200 62200 0 0.0
.dynamic 592 592 0 0.0
.got 4096 4096 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 173052 173052 0 0.0
.text 1612450 1612450 0 0.0
lighting-app debug+rpc (read only) 2068777 2068777 0 0.0
(read/write) 124488 124488 0 0.0
.bss 51424 51424 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 66144 66144 0 0.0
.dynamic 608 608 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 704 704 0 0.0
.rodata 165617 165617 0 0.0
.text 1747730 1747730 0 0.0
ota-provider-app debug (read only) 1866513 1866513 0 0.0
(read/write) 114792 114792 0 0.0
.bss 50368 50368 0 0.0
.data 1320 1320 0 0.0
.data.rel.ro 57480 57480 0 0.0
.dynamic 608 608 0 0.0
.got 4352 4352 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 158195 158195 0 0.0
.text 1557778 1557778 0 0.0
ota-requestor-app debug (read only) 1877025 1877025 0 0.0
(read/write) 116560 116560 0 0.0
.bss 51232 51232 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 58744 58744 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 151940 151940 0 0.0
.text 1576274 1576274 0 0.0
shell debug (read only) 2360633 2360633 0 0.0
(read/write) 147168 147168 0 0.0
.bss 67552 67552 0 0.0
.data 864 864 0 0.0
.data.rel.ro 73096 73096 0 0.0
.dynamic 592 592 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 204178 204178 0 0.0
.text 1999922 1999922 0 0.0
thermostat-no-ble arm64 (read only) 2161076 2161076 0 0.0
(read/write) 148577 148577 0 0.0
.bss 65265 65265 0 0.0
.data 1056 1056 0 0.0
.data.rel.ro 75080 75080 0 0.0
.dynamic 560 560 0 0.0
.got 4216 4216 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 132756 132756 0 0.0
.text 1810016 1810016 0 0.0
tv-app debug (read only) 2587017 2587017 0 0.0
(read/write) 148624 148624 0 0.0
.bss 65824 65824 0 0.0
.data 3168 3168 0 0.0
.data.rel.ro 73624 73624 0 0.0
.dynamic 592 592 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 872 872 0 0.0
.rodata 198173 198173 0 0.0
.text 2215106 2215106 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449520 2449520 0 0.0
.bss 191016 191016 0 0.0
.data 5512 5512 0 0.0
.text 1412092 1412092 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2414280 2414280 0 0.0
.bss 188188 188188 0 0.0
.data 5800 5800 0 0.0
.text 1376852 1376852 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2350100 2350100 0 0.0
.bss 187092 187092 0 0.0
.data 5776 5776 0 0.0
.text 1312700 1312700 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1155428 1155428 0 0.0
.bss 11952 11952 0 0.0
.data 4512 4512 0 0.0
.text 118812 118812 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2340032 2340032 0 0.0
.bss 185728 185728 0 0.0
.data 5608 5608 0 0.0
.text 1302604 1302604 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1038395 1038395 0 0.0
bss 125752 125752 0 0.0
rodata 135772 135772 0 0.0
text 699648 699648 0 0.0
lighting-app nrf52840dk_nrf52840 (read/write) 1001607 1001607 0 0.0
bss 122060 122060 0 0.0
rodata 116016 116016 0 0.0
text 686028 686028 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 967935 967935 0 0.0
bss 119144 119144 0 0.0
rodata 107392 107392 0 0.0
text 663252 663252 0 0.0
nrf52840dongle_nrf52840 (read/write) 1017695 1017695 0 0.0
bss 123108 123108 0 0.0
rodata 115700 115700 0 0.0
text 690732 690732 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 904418 904418 0 0.0
bss 119348 119348 0 0.0
rodata 108128 108128 0 0.0
text 595740 595740 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 930695 930695 0 0.0
bss 120276 120276 0 0.0
rodata 104848 104848 0 0.0
text 628512 628512 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 834318 834318 0 0.0
bss 117596 117596 0 0.0
rodata 96876 96876 0 0.0
text 538988 538988 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 501603 501603 0 0.0
bss 52584 52584 0 0.0
rodata 44500 44500 0 0.0
text 342712 342712 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 928955 928955 0 0.0
bss 120008 120008 0 0.0
rodata 103828 103828 0 0.0
text 627940 627940 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 924915 924915 0 0.0
bss 120012 120012 0 0.0
rodata 103524 103524 0 0.0
text 624196 624196 0 0.0
shell nrf52840dk_nrf52840 (read/write) 788811 788811 0 0.0
bss 112360 112360 0 0.0
rodata 74836 74836 0 0.0
text 525504 525504 0 0.0
p6 all-clusters-app default (read/write) 2487472 2487472 0 0.0
.bss 118656 118656 0 0.0
.data 2688 2688 0 0.0
.text 1445736 1445736 0 0.0
light-app default (read/write) 2394696 2394696 0 0.0
.bss 112976 112976 0 0.0
.data 2536 2536 0 0.0
.text 1352960 1352960 0 0.0
lock-app default (read/write) 2358272 2358272 0 0.0
.bss 112720 112720 0 0.0
.data 2496 2496 0 0.0
.text 1316536 1316536 0 0.0
qpg lighting-app qpg6105+debug (read only) 600656 600656 0 0.0
(read/write) 146936 146936 0 0.0
.bss 90904 90904 0 0.0
.data 1124 1124 0 0.0
.text 595336 595336 0 0.0
lock-app qpg6105+debug (read only) 566460 566460 0 0.0
(read/write) 146936 146936 0 0.0
.bss 90912 90912 0 0.0
.data 1076 1076 0 0.0
.text 561140 561140 0 0.0
persistent-storage-app qpg6105+debug (read only) 99536 99536 0 0.0
(read/write) 146941 146941 0 0.0
.bss 24001 24001 0 0.0
.data 180 180 0 0.0
.text 94216 94216 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 882546 882546 0 0.0
bss 86336 86336 0 0.0
noinit 37160 37160 0 0.0
text 623542 623542 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit ad6d418 into project-chip:master Feb 25, 2022
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Mar 1, 2022
vivien-apple added a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Mar 1, 2022
woody-apple pushed a commit to vivien-apple/connectedhomeip-1 that referenced this pull request Mar 2, 2022
bzbarsky-apple pushed a commit that referenced this pull request Mar 2, 2022
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