mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 01:49:53 +00:00
5ba69401c1
* Fix warnings about incorrect format specifiers. GCC only wants to see void pointers for %p formatters, so cast as appropriate. * Fix a warning about an invalid enum value. The following warning was observed when compiling with -pedantic: warning: ISO C restricts enumerator values to range of 'int' (2147483648 is too large) The values of these enums don't escape wav_read_header() and are only used to set bits in a bitmask, so simply use the next bit rather than jumping to a huge number. * Give anonymous unions a name. This fixes the 'anonymous unions are a C11 extension' warning when compiling with -pedantic. * Use flexible array members rather than zero sized arrays. This flagged up the following warning when compiling with -pedantic: warning: zero size arrays are an extension [-Wzero-length-array] * Safely return the smallest value of a short. GCC gives the following warning when compiling with -pedantic: warning: overflow in conversion from 'int' to 'short int' changes value from '32768' to '-32768' [-Woverflow] This looks intentional from the surrounding code, so return -32768 in a legal way rather than depending on undefined behaviour. * Use the same min/max approach with all compilers. The GCC specific code gives the following warning from GCC when compiled with -pedantic: warning: ISO C forbids braced-groups within expressions [-pedantic] This code was also a fundamentally different way of calculating min/max since it didn't evaluate the inputs more than once, which meant there was potentially a difference in behaviour when the library was built with different compilers if the evaluation of 'a' or 'b' had side effects. |
||
---|---|---|
.. | ||
aiff_rw_test.c | ||
alaw_test.c | ||
benchmark-0.0.28 | ||
benchmark-1.0.0 | ||
benchmark-1.0.0rc2 | ||
benchmark-1.0.6pre10-coltrane | ||
benchmark-1.0.6pre10-miles | ||
benchmark-1.0.18pre16-hendrix | ||
benchmark-1.0.18pre16-mingus | ||
benchmark-latest-coltrane | ||
benchmark.def | ||
benchmark.tpl | ||
channel_test.c | ||
checksum_test.c | ||
chunk_test.c | ||
command_test.c | ||
compression_size_test.c | ||
cpp_test.cc | ||
cue_test.c | ||
dft_cmp.c | ||
dft_cmp.h | ||
dither_test.c | ||
dwvw_test.c | ||
error_test.c | ||
external_libs_test.c | ||
fix_this.c | ||
floating_point_test.def | ||
floating_point_test.tpl | ||
format_check_test.c | ||
generate.c | ||
generate.h | ||
header_test.def | ||
header_test.tpl | ||
headerless_test.c | ||
largefile_test.c | ||
locale_test.c | ||
long_read_write_test.c | ||
lossy_comp_test.c | ||
misc_test.c | ||
multi_file_test.c | ||
ogg_opus_test.c | ||
ogg_test.c | ||
pcm_test.def | ||
pcm_test.tpl | ||
peak_chunk_test.c | ||
pedantic-header-test.sh.in | ||
pipe_test.def | ||
pipe_test.tpl | ||
raw_test.c | ||
rdwr_test.def | ||
rdwr_test.tpl | ||
scale_clip_test.def | ||
scale_clip_test.tpl | ||
sftest.c | ||
sfversion.c | ||
stdin_test.c | ||
stdio_test.c | ||
stdout_test.c | ||
string_test.c | ||
test_wrapper.sh.in | ||
ulaw_test.c | ||
utils.def | ||
utils.tpl | ||
virtual_io_test.c | ||
win32_ordinal_test.c | ||
win32_test.c | ||
write_read_test.def | ||
write_read_test.tpl |