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
+9 -3
View File
@@ -170,7 +170,9 @@ int MspV1::Receive(uint8_t *payload, uint8_t *message_id)
}
while (bytes_available > 4) {
if ((ret = read(_fd, header, 1)) != 1) {
ret = read(_fd, header, 1);
if (ret != 1) {
return ret;
}
@@ -186,7 +188,9 @@ int MspV1::Receive(uint8_t *payload, uint8_t *message_id)
return -EWOULDBLOCK;
}
if ((ret = read(_fd, &header[1], 4)) != 4) {
ret = read(_fd, &header[1], 4);
if (ret != 4) {
return ret;
}
@@ -198,7 +202,9 @@ int MspV1::Receive(uint8_t *payload, uint8_t *message_id)
payload_size = header[3];
*message_id = header[4];
if ((ret = read(_fd, payload, payload_size + MSP_CRC_SIZE)) != payload_size + MSP_CRC_SIZE) {
ret = read(_fd, payload, payload_size + MSP_CRC_SIZE);
if (ret != payload_size + MSP_CRC_SIZE) {
if (ret != -EWOULDBLOCK) {
has_header = false;
}