Skip to content

Commit

Permalink
Bluetooth: audio: Fix potential compilation warnings
Browse files Browse the repository at this point in the history
This fixes potential compilation warning about implicit
conversion to unsigned char.

Signed-off-by: Mariusz Skamra <[email protected]>
  • Loading branch information
MariuszSkamra authored and mbolivar-nordic committed Feb 25, 2022
1 parent 48cca61 commit 27d95a0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/bluetooth/audio/lc3.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,21 @@ struct bt_codec_lc3_frame_len {
*/
#define BT_CODEC_LC3_DATA(_freq, _duration, _chan_count, _len_min, _len_max) \
{ \
BT_CODEC_DATA(BT_CODEC_LC3_FREQ, _freq, _freq >> 8), \
BT_CODEC_DATA(BT_CODEC_LC3_FREQ, (_freq) & 0xffu, (_freq) >> 8), \
BT_CODEC_DATA(BT_CODEC_LC3_DURATION, _duration), \
BT_CODEC_DATA(BT_CODEC_LC3_CHAN_COUNT, _chan_count), \
BT_CODEC_DATA(BT_CODEC_LC3_FRAME_LEN, _len_min, _len_min >> 8, \
_len_max, _len_max >> 8,) \
BT_CODEC_DATA(BT_CODEC_LC3_FRAME_LEN, (_len_min) & 0xffu, (_len_min) >> 8, \
(_len_max) & 0xffu, (_len_max) >> 8) \
}

/** @def BT_CODEC_LC3_META
* @brief Helper to declare LC3 codec metadata
*/
#define BT_CODEC_LC3_META(_prefer_context, _context) \
{ \
BT_CODEC_DATA(BT_CODEC_META_PREFER_CONTEXT, _prefer_context & 0xff, \
_prefer_context >> 8), \
BT_CODEC_DATA(BT_CODEC_META_CONTEXT, _context & 0xff, _context >> 8) \
BT_CODEC_DATA(BT_CODEC_META_PREFER_CONTEXT, (_prefer_context) & 0xffu, \
(_prefer_context) >> 8), \
BT_CODEC_DATA(BT_CODEC_META_CONTEXT, (_context) & 0xffu, (_context) >> 8) \
}

/** @def BT_CODEC_LC3
Expand All @@ -229,9 +229,9 @@ struct bt_codec_lc3_frame_len {
{ \
BT_CODEC_DATA(BT_CODEC_CONFIG_LC3_FREQ, _freq), \
BT_CODEC_DATA(BT_CODEC_CONFIG_LC3_DURATION, _duration), \
BT_CODEC_DATA(BT_CODEC_CONFIG_LC3_CHAN_ALLOC, _loc, _loc >> 8, \
_loc >> 16, _loc >> 24), \
BT_CODEC_DATA(BT_CODEC_CONFIG_LC3_FRAME_LEN, _len, _len >> 8) \
BT_CODEC_DATA(BT_CODEC_CONFIG_LC3_CHAN_ALLOC, (_loc) & 0xffu, ((_loc) >> 8) & 0xffu, \
((_loc) >> 16) & 0xffu, (_loc) >> 24), \
BT_CODEC_DATA(BT_CODEC_CONFIG_LC3_FRAME_LEN, (_len) & 0xffu, (_len) >> 8) \
}

/** @def BT_CODEC_LC3_CONFIG_DATA
Expand Down

0 comments on commit 27d95a0

Please sign in to comment.