Skip to content

Commit 98304e7

Browse files
committed
utils/sdp_parser: Add [[maybe_unused]] to fix warn
1 parent ead669c commit 98304e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/sdp_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Rtp_pkt_view Rtp_pkt_view::from_buffer(void *buf, size_t size){
169169

170170
[[maybe_unused]] uint8_t version = charbuf[0] >> 6;
171171
bool padding = charbuf[0] & (1 << 5);
172-
bool extension = charbuf[0] & (1 << 4);
172+
[[maybe_unused]] bool extension = charbuf[0] & (1 << 4);
173173
ret.csrc_count = charbuf[0] & 0x0F;
174174
ret.marker = charbuf[1] & 0x80;
175175
ret.payload_type = charbuf[1] & 0x7F;
@@ -186,7 +186,7 @@ Rtp_pkt_view Rtp_pkt_view::from_buffer(void *buf, size_t size){
186186
if(ret.data_len == 0)
187187
return ret;
188188

189-
uint8_t padding_bytes = ((uint8_t *)(ret.data))[ret.data_len - 1];
189+
uint8_t padding_bytes = static_cast<uint8_t *>(ret.data)[ret.data_len - 1];
190190
if(padding_bytes > ret.data_len)
191191
return ret;
192192

0 commit comments

Comments
 (0)