Skip to content

Commit 6353915

Browse files
committed
fix according to sonar
1 parent 43601f4 commit 6353915

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libcanard/canard.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// --------------------------------------------- INTERNAL INCLUDES ----------------------------------------------
4242
// The internal includes are placed here after the config header is included and CANARD_ASSERT is defined.
4343
#define CAVL2_T struct CanardTreeNode
44-
#define CAVL2_ASSERT(x) CANARD_ASSERT(x)
44+
#define CAVL2_ASSERT(x) CANARD_ASSERT(x) // NOSONAR
4545
#include <cavl2.h>
4646

4747
// --------------------------------------------- COMMON DEFINITIONS ---------------------------------------------
@@ -1454,7 +1454,7 @@ int8_t canardRxUnsubscribe(struct CanardInstance* const ins,
14541454
return out;
14551455
}
14561456

1457-
int8_t canardRxGetSubscription(struct CanardInstance* const ins,
1457+
int8_t canardRxGetSubscription(const struct CanardInstance* const ins,
14581458
const enum CanardTransferKind transfer_kind,
14591459
const CanardPortID port_id,
14601460
struct CanardRxSubscription** const out_subscription)

libcanard/canard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ int8_t canardRxUnsubscribe(struct CanardInstance* const ins,
799799
///
800800
/// The time complexity is logarithmic from the number of current subscriptions under the specified transfer kind.
801801
/// This function does not allocate new memory.
802-
int8_t canardRxGetSubscription(struct CanardInstance* const ins,
802+
int8_t canardRxGetSubscription(const struct CanardInstance* const ins,
803803
const enum CanardTransferKind transfer_kind,
804804
const CanardPortID port_id,
805805
struct CanardRxSubscription** const out_subscription);

0 commit comments

Comments
 (0)