mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
Fix Clang warnings
This commit is contained in:
parent
8993979891
commit
e01ee91591
@ -509,7 +509,8 @@ win32_play_data (Win32_Audio_Data *audio_data)
|
|||||||
/* fill a buffer if there is more data and we can read it sucessfully */
|
/* fill a buffer if there is more data and we can read it sucessfully */
|
||||||
readcount = (audio_data->remaining > audio_data->bufferlen) ? audio_data->bufferlen : (int) audio_data->remaining ;
|
readcount = (audio_data->remaining > audio_data->bufferlen) ? audio_data->bufferlen : (int) audio_data->remaining ;
|
||||||
|
|
||||||
thisread = (int) sf_read_short (audio_data->sndfile, (short *) (audio_data->whdr [audio_data->current].lpData), readcount) ;
|
short *lpData = (short *) (void *) audio_data->whdr [audio_data->current].lpData ;
|
||||||
|
thisread = (int) sf_read_short (audio_data->sndfile, lpData, readcount) ;
|
||||||
|
|
||||||
audio_data->remaining -= thisread ;
|
audio_data->remaining -= thisread ;
|
||||||
|
|
||||||
|
@ -692,14 +692,7 @@ pcm_test_double (const char *filename, int filetype, uint64_t hash, int replace_
|
|||||||
|
|
||||||
sf_close (file) ;
|
sf_close (file) ;
|
||||||
|
|
||||||
#if (defined (WIN32) || defined (_WIN32))
|
|
||||||
/* File hashing on Win32 fails due to slighty different
|
|
||||||
** calculated values of the sin() function.
|
|
||||||
*/
|
|
||||||
hash = hash ; /* Avoid compiler warning. */
|
|
||||||
#else
|
|
||||||
check_file_hash_or_die (filename, hash, __LINE__) ;
|
check_file_hash_or_die (filename, hash, __LINE__) ;
|
||||||
#endif
|
|
||||||
|
|
||||||
memset (data, 0, items * sizeof (double)) ;
|
memset (data, 0, items * sizeof (double)) ;
|
||||||
|
|
||||||
@ -826,14 +819,7 @@ pcm_test_double (const char *filename, int filetype, uint64_t hash, int replace_
|
|||||||
|
|
||||||
sf_close (file) ;
|
sf_close (file) ;
|
||||||
|
|
||||||
#if (defined (WIN32) || defined (_WIN32))
|
|
||||||
/* File hashing on Win32 fails due to slighty different
|
|
||||||
** calculated values.
|
|
||||||
*/
|
|
||||||
hash = hash ; /* Avoid compiler warning. */
|
|
||||||
#else
|
|
||||||
check_file_hash_or_die (filename, hash, __LINE__) ;
|
check_file_hash_or_die (filename, hash, __LINE__) ;
|
||||||
#endif
|
|
||||||
|
|
||||||
memset (data, 0, items * sizeof (double)) ;
|
memset (data, 0, items * sizeof (double)) ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user