fix(ci): enable clang-tidy bugprone-macro-parentheses (#26722)

Signed-off-by: kuralme <kuralme@protonmail.com>
This commit is contained in:
Ege Kural
2026-03-12 16:42:07 -04:00
committed by GitHub
parent 11700382f6
commit 4a33fb169f
5 changed files with 6 additions and 7 deletions
-1
View File
@@ -150,7 +150,6 @@ Checks: '*,
-readability-convert-member-functions-to-static,
-readability-make-member-function-const,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-signed-char-misuse,
-cppcoreguidelines-avoid-non-const-global-variables,
@@ -645,7 +645,7 @@ int uORBTest::UnitTest::test_wrap_around()
}
#define CHECK_COPY(i_got, i_correct) \
orb_copy(ORB_ID(orb_test_medium_wrap_around), sfd, &u); \
if (i_got != i_correct) { \
if ((i_got) != (i_correct)) { \
return test_fail("got wrong element from the queue (got %i, should be %i)", i_got, i_correct); \
}
@@ -875,7 +875,7 @@ int uORBTest::UnitTest::test_queue()
}
#define CHECK_COPY(i_got, i_correct) \
orb_copy(ORB_ID(orb_test_medium_queue), sfd, &u); \
if (i_got != i_correct) { \
if ((i_got) != (i_correct)) { \
return test_fail("got wrong element from the queue (got %i, should be %i)", i_got, i_correct); \
}
@@ -88,7 +88,7 @@ typedef enum : int32_t {
TRIGGER_MODE_DISTANCE_ON_CMD
} trigger_mode_t;
#define commandParamToInt(n) static_cast<int>(n >= 0 ? n + 0.5f : n - 0.5f)
#define commandParamToInt(n) static_cast<int>((n) >= 0 ? (n) + 0.5f : (n) - 0.5f)
class CameraTrigger final : public px4::ScheduledWorkItem
{
+2 -2
View File
@@ -51,8 +51,8 @@
# define debug(fmt, args...) do { } while(0)
#endif
#define CODER_CHECK(_c) do { if (_c->dead) { PX4_ERR("coder dead"); return -1; }} while(0)
#define CODER_KILL(_c, _reason) do { PX4_ERR("killed: %s", _reason); _c->dead = true; return -1; } while(0)
#define CODER_CHECK(_c) do { if ((_c)->dead) { PX4_ERR("coder dead"); return -1; }} while(0)
#define CODER_KILL(_c, _reason) do { PX4_ERR("killed: %s", _reason); (_c)->dead = true; return -1; } while(0)
static int
read_x(bson_decoder_t decoder, void *p, size_t s)
+1 -1
View File
@@ -46,7 +46,7 @@
#include <errno.h>
#define BEAT_TIME_CONVERSION_MS (60 * 1000 * 4)
#define BEAT_TIME_CONVERSION_US BEAT_TIME_CONVERSION_MS * 1000
#define BEAT_TIME_CONVERSION_US (BEAT_TIME_CONVERSION_MS * 1000)
#define BEAT_TIME_CONVERSION BEAT_TIME_CONVERSION_US
// semitone offsets from C for the characters 'A'-'G'