CI: enable clang-tidy bugprone-assignment-in-if-condition (#26580)

* docs: auto-sync metadata [skip ci]

  Co-Authored-By: PX4 BuildBot <bot@px4.io>

CI: enable clang-tidy bugprone-assignment-in-if-condition

Signed-off-by: kuralme <kuralme@protonmail.com>

initialize and immediate assignments made one line

Signed-off-by: kuralme <kuralme@protonmail.com>

* two more initialization fix

Signed-off-by: kuralme <kuralme@protonmail.com>

---------

Signed-off-by: kuralme <kuralme@protonmail.com>
Co-authored-by: PX4BuildBot <bot@px4.io>
This commit is contained in:
Ege Kural
2026-02-27 04:04:45 -05:00
committed by GitHub
parent c424edd055
commit d317113dc8
11 changed files with 66 additions and 37 deletions
@@ -941,10 +941,10 @@ int uORBTest::UnitTest::pub_test_queue_entry(int argc, char *argv[])
int uORBTest::UnitTest::pub_test_queue_main()
{
orb_test_medium_s t{};
orb_advert_t ptopic{nullptr};
orb_advert_t ptopic = orb_advertise(ORB_ID(orb_test_medium_queue_poll), &t);
const int queue_size = orb_get_queue_size(ORB_ID(orb_test_medium_queue_poll));
if ((ptopic = orb_advertise(ORB_ID(orb_test_medium_queue_poll), &t)) == nullptr) {
if (ptopic == nullptr) {
_thread_should_exit = true;
return test_fail("advertise failed: %d", errno);
}
@@ -981,9 +981,9 @@ int uORBTest::UnitTest::test_queue_poll_notify()
test_note("Testing orb queuing (poll & notify)");
orb_test_medium_s t{};
int sfd = -1;
int sfd = orb_subscribe(ORB_ID(orb_test_medium_queue_poll));
if ((sfd = orb_subscribe(ORB_ID(orb_test_medium_queue_poll))) < 0) {
if (sfd < 0) {
return test_fail("subscribe failed: %d", errno);
}