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
[build] fix warning of clearing non-trivial type #5710
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5710 +/- ##
==========================================
+ Coverage 78.07% 82.67% +4.59%
==========================================
Files 378 378
Lines 48145 48447 +302
==========================================
+ Hits 37589 40052 +2463
+ Misses 10556 8395 -2161
|
Size Report of OpenThread
|
Note that code size increased by about 300B. @wgtdkp |
2050ab3
to
408860b
Compare
Yes, we introduced a new default constructor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this PR is increasing code size (ncp/cli ftd) by ~270 bytes (I guess from extra constructor calls).
Some suggestions below where I think we can fix/address the compiler warning and avoid the overhead.
408860b
to
e3c3ef0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks 👍
Bug: 171933690 * origin/github/master: [low-power] implement forward tracking series (openthread#5608) [efr32] radio: increase FIFO size to allow handling of heavy traffic (openthread#5742) [test] verify realm-local multicast on POSIX (openthread#5738) [clang-tidy] google-explicit-constructor (openthread#5734) [clang-tidy] misc-unused-using-decls (openthread#5732) [continuous-integration] use lcov to generate coverage data (openthread#5635) [type-traits] add 'IsPointer<Type>' and use it in message/dataset (openthread#5735) [posix] set default IPv6 hop limit to OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT (openthread#5736) [net-diag] invoke the callback when failed to get the response (openthread#5653) [site] fix border router guide typo in network (openthread#5731) [cli] update cli doc (openthread#5729) [thread-cert] refactor case 5.1.3 using pktverify (openthread#5708) [thread-cert] refactor case 5.1.2 using pktverify (openthread#5686) [test] arm build with cmake 3.10 (openthread#5727) [clang-tidy] google-readability-casting (openthread#5720) [clang-tidy] modernize-use-equals-default (openthread#5719) [clang-tidy] readability-avoid-const-params-in-decls (openthread#5717) [clang-tidy] modernize-use-equals-delete (openthread#5718) [efr32] add MG21/BRD4180B support (openthread#5725) [posix] fix cast-align build error on ARM (openthread#5672) [logging] add optional `otPlatLogLine()` & use it in NCP/CLI (openthread#5704) [clang-tidy] readability-simplify-boolean-expr (openthread#5716) [clang-tidy] modernize-use-nullptr (openthread#5715) [dataset] add new helper 'SetTlv()' with a template 'ValueType' (openthread#5722) [dataset-manager] simplify 'SendSetRequest()' (openthread#5721) [nrf528xx] fix SPI issue (openthread#5703) [clang-tidy] modernize-use-bool-literals (openthread#5714) [cmake] no target_link_options in cmake 3.10 (openthread#5706) [low-power] enhance CSL transmission on NRF52840 using `transmit_at` (openthread#5545) [build] fix warning of clearing non-trivial type (openthread#5710) [scripts] add MLR Backbone multicast routing test (openthread#5578) [mlr] fix build when OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE is disabled (openthread#5711) [cmake] use init flags in toolchain files (openthread#5705) [cmake] set default build type to Debug (openthread#5709) [thread-cert] refactor case 5.1.1 using pktverify (openthread#5680) [posix] fix udp close (openthread#5690) Change-Id: Ic7e4051040f093aa6dce9de5e2031a8accddec87
There is a warning with gcc/g++ 10.2.0 when clearing an object of non-trivial type with
memset
:(build command:
cmake -GNinja -DOT_COMMISSIONER=ON .. && ninja
)This PR fixes this issue:
memset
usages;OT_COMPILE_WARNING_AS_ERROR
for all CI builds;