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

Modernize use nullptr #16306

Merged
merged 6 commits into from
Mar 16, 2022
Merged

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Mar 16, 2022

Problem

NULL used instead of nullptr. clang-tidy can fix this.

Change overview

After some tweaks to get clang builds using build_examples.py, I ran:

./.environment/cipd/packages/pigweed/bin/run-clang-tidy -p ./out/linux-x64-chip-tool-clang/ -fix -checks modernize-use-nullptr 'connectedhomeip/src/'

Testing

CI will validate. This change was made by an automated tool.

@github-actions
Copy link

github-actions bot commented Mar 16, 2022

PR #16306: Size comparison from 645b03b to cb7a7ef

Full report (13 builds for linux, nrfconnect, telink)
platform target config section 645b03b cb7a7ef change % change
linux all-clusters-app debug (read only) 2471121 2471121 0 0.0
(read/write) 146544 146544 0 0.0
.bss 60736 60736 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78808 78808 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 210853 210853 0 0.0
.text 2096914 2096914 0 0.0
bridge-app debug+rpc (read only) 1747453 1747453 0 0.0
(read/write) 92720 92720 0 0.0
.bss 47784 47784 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 37904 37904 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 143564 143564 0 0.0
.text 1488773 1488773 0 0.0
chip-tool debug (read only) 10127373 10127373 0 0.0
(read/write) 357720 357720 0 0.0
.bss 25728 25728 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 324864 324864 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 515669 515669 0 0.0
.text 8830373 8830373 0 0.0
chip-tool-ipv6only arm64 (read only) 9754132 9754132 0 0.0
(read/write) 475473 475473 0 0.0
.bss 44033 44033 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371256 371256 0 0.0
.dynamic 560 560 0 0.0
.got 55264 55264 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492348 492348 0 0.0
.text 8211892 8211892 0 0.0
door-lock-app debug (read only) 1998585 1998585 0 0.0
(read/write) 120192 120192 0 0.0
.bss 51008 51008 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62808 62808 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 179740 179740 0 0.0
.text 1669282 1669282 0 0.0
lighting-app debug+rpc (read only) 2130201 2130201 0 0.0
(read/write) 125512 125512 0 0.0
.bss 51776 51776 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 66760 66760 0 0.0
.dynamic 608 608 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 172316 172316 0 0.0
.text 1801298 1801298 0 0.0
ota-provider-app debug (read only) 1933633 1933633 0 0.0
(read/write) 116016 116016 0 0.0
.bss 50912 50912 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 58168 58168 0 0.0
.dynamic 608 608 0 0.0
.got 4376 4376 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 165739 165739 0 0.0
.text 1616226 1616226 0 0.0
ota-requestor-app debug (read only) 1963417 1963417 0 0.0
(read/write) 118984 118984 0 0.0
.bss 51904 51904 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 60232 60232 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 161764 161764 0 0.0
.text 1649762 1649762 0 0.0
shell debug (read only) 2421345 2421345 0 0.0
(read/write) 150600 150600 0 0.0
.bss 70664 70664 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73440 73440 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 208850 208850 0 0.0
.text 2055890 2055890 0 0.0
thermostat-no-ble arm64 (read only) 2219868 2219868 0 0.0
(read/write) 149777 149777 0 0.0
.bss 65713 65713 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75696 75696 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 137660 137660 0 0.0
.text 1862240 1862240 0 0.0
tv-app debug (read only) 2669889 2669889 0 0.0
(read/write) 251192 251192 0 0.0
.bss 167904 167904 0 0.0
.data 3104 3104 0 0.0
.data.rel.ro 74152 74152 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 205621 205621 0 0.0
.text 2289538 2289538 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1154647 1154647 0 0.0
bss 146724 146724 0 0.0
rodata 145432 145432 0 0.0
text 787340 787340 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 894566 894566 0 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 632492 632492 0 0.0

@boring-cyborg boring-cyborg bot added the ble label Mar 16, 2022
@github-actions
Copy link

github-actions bot commented Mar 16, 2022

PR #16306: Size comparison from 645efef to bfe8a56

Full report (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 645efef bfe8a56 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603122 603122 0 0.0
.app_xip_area 510220 510220 0 0.0
.bss 75656 75656 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560910 560910 0 0.0
.app_xip_area 469536 469536 0 0.0
.bss 74160 74160 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570794 570794 0 0.0
.app_xip_area 469772 469772 0 0.0
.bss 83464 83464 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 920572 920572 0 0.0
(read/write) 128752 128752 0 0.0
.bss 126744 126744 0 0.0
.data 2008 2008 0 0.0
.text 920564 920564 0 0.0
BRD4161A+rpc (read only) 949392 949392 0 0.0
(read/write) 144712 144712 0 0.0
.bss 142520 142520 0 0.0
.data 2188 2188 0 0.0
.text 949384 949384 0 0.0
window-app BRD4161A (read only) 851336 851336 0 0.0
(read/write) 126704 126704 0 0.0
.bss 124840 124840 0 0.0
.data 1864 1864 0 0.0
.text 851328 851328 0 0.0
esp32 all-clusters-app c3devkit (read only) 961044 961044 0 0.0
(read/write) 1394706 1394706 0 0.0
.dram0.bss 64048 64048 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 197560 197560 0 0.0
.flash.text 961044 961044 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1017055 1017055 0 0.0
(read/write) 462380 462380 0 0.0
.dram0.bss 69576 69576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 226952 226952 0 0.0
.flash.text 1011671 1011671 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 699800 699800 0 0.0
.bss 77632 77632 0 0.0
.data 1888 1888 0 0.0
.text 614480 614480 0 0.0
lock k32w061+release (read/write) 700096 700096 0 0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 614764 614764 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9753604 9753604 0 0.0
(read/write) 475473 475473 0 0.0
.bss 44033 44033 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371256 371256 0 0.0
.dynamic 560 560 0 0.0
.got 55264 55264 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492364 492364 0 0.0
.text 8211348 8211348 0 0.0
thermostat-no-ble arm64 (read only) 2219292 2219292 0 0.0
(read/write) 149777 149777 0 0.0
.bss 65713 65713 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75696 75696 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 137676 137676 0 0.0
.text 1861648 1861648 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352068 2352068 0 0.0
.bss 186644 186644 0 0.0
.data 5752 5752 0 0.0
.text 1314668 1314668 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1154487 1154487 0 0.0
bss 146724 146724 0 0.0
rodata 145432 145432 0 0.0
text 787180 787180 0 0.0
p6 all-clusters-app default (read/write) 2491280 2491280 0 0.0
.bss 120072 120072 0 0.0
.data 2632 2632 0 0.0
.text 1449544 1449544 0 0.0
light-app default (read/write) 2395136 2395136 0 0.0
.bss 113536 113536 0 0.0
.data 2488 2488 0 0.0
.text 1353400 1353400 0 0.0
lock-app default (read/write) 2358680 2358680 0 0.0
.bss 113280 113280 0 0.0
.data 2448 2448 0 0.0
.text 1316944 1316944 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 894566 894566 0 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 632492 632492 0 0.0

@andy31415 andy31415 merged commit ba133af into project-chip:master Mar 16, 2022
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
* use clang-tidy to modernize-use-nullptr

* Use BLE_CONNECTION_UNINITIALIZED instead of NULL for ble comparisons

* Define BLE_CONNECTION_UNINITIALIZED as nullptr instead of NULL

* Restyle
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.

4 participants