During building the canard.c with arm compiler with Wcast-align flag, few warnings appear.
To reproduce these warnings, you may type the command below:
libcanard/canard.c: In function 'txAVLPredicate':
libcanard/canard.c:327:45: warning: cast increases required alignment of target type [-Wcast-align]
327 | const CanardTxQueueItem* const other = (const CanardTxQueueItem*) node;
| ^
libcanard/canard.c: In function 'rxSubscriptionPredicateOnPortID':
libcanard/canard.c:948:38: warning: cast increases required alignment of target type [-Wcast-align]
948 | const CanardPortID other = ((const CanardRxSubscription*) node)->port_id;
| ^
libcanard/canard.c: In function 'canardTxPeek':
libcanard/canard.c:1055:15: warning: cast increases required alignment of target type [-Wcast-align]
1055 | out = (const CanardTxQueueItem*) cavlFindExtremum(que->root, false);
| ^
libcanard/canard.c: In function 'canardRxAccept':
libcanard/canard.c:1099:21: warning: cast increases required alignment of target type [-Wcast-align]
1099 | (CanardRxSubscription*) cavlSearch(&ins->rx_subscriptions[(size_t) model.transfer_kind],
| ^
libcanard/canard.c: In function 'canardRxUnsubscribe':
libcanard/canard.c:1179:55: warning: cast increases required alignment of target type [-Wcast-align]
1179 | CanardRxSubscription* const sub = (CanardRxSubscription*)
|
This PR simply adds a new job with libcanard building for ARM to the github workflow that reproduces these warnings and an intermediate cast to (void*) to prevent these warnings.
During building the
canard.c
with arm compiler withWcast-align
flag, few warnings appear. To reproduce these warnings, you may type the command below:It returns the following warnings:
This PR simply adds a new job with libcanard building for ARM to the github workflow that reproduces these warnings and an intermediate cast to (void*) to prevent these warnings.