Add FLAC host test (#302)

This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2020-09-03 08:37:15 -07:00
1 parent 1c51669729
commit 93a540da9b
6 files changed
+50 -3

No files matched your search

+6
View File
@@ -121,6 +121,8 @@ struct FLAC__BitReader {
void *client_data;
};
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
static inline void crc16_update_word_(FLAC__BitReader *br, brword word)
{
unsigned crc = br->read_crc16;
@@ -149,6 +151,7 @@ static inline void crc16_update_word_(FLAC__BitReader *br, brword word)
#endif
br->crc16_align = 0;
}
#pragma GCC diagnostic pop
static FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br)
{
@@ -338,6 +341,8 @@ void FLAC__bitreader_reset_read_crc16(FLAC__BitReader *br, FLAC__uint16 seed)
br->crc16_align = br->consumed_bits;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br)
{
FLAC__ASSERT(0 != br);
@@ -353,6 +358,7 @@ FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br)
}
return br->read_crc16;
}
#pragma GCC diagnostic pop
inline FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br)
{
+3 -1
View File
@@ -136,7 +136,8 @@ FLAC__uint8 FLAC__crc8(const FLAC__byte *data, unsigned len)
return crc;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
unsigned FLAC__crc16(const FLAC__byte *data, unsigned len)
{
unsigned crc = 0;
@@ -146,3 +147,4 @@ unsigned FLAC__crc16(const FLAC__byte *data, unsigned len)
return crc;
}
#pragma GCC diagnostic pop
+3
View File
@@ -2021,6 +2021,8 @@ FLAC__bool frame_sync_(FLAC__StreamDecoder *decoder)
return true;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
FLAC__bool read_frame_(FLAC__StreamDecoder *decoder, FLAC__bool *got_a_frame, FLAC__bool do_full_decode)
{
uint32_t channel;
@@ -2167,6 +2169,7 @@ FLAC__bool read_frame_(FLAC__StreamDecoder *decoder, FLAC__bool *got_a_frame, FL
decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
return true;
}
#pragma GCC diagnostic pop
FLAC__bool read_frame_header_(FLAC__StreamDecoder *decoder)
{