mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 02:06:27 +08:00
fix(ci): enable clang-tidy bugprone-macro-parentheses (#26722)
Signed-off-by: kuralme <kuralme@protonmail.com>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user