mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 01:49:53 +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 */
|
||||
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 ;
|
||||
|
||||
|
@ -692,14 +692,7 @@ pcm_test_double (const char *filename, int filetype, uint64_t hash, int replace_
|
||||
|
||||
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__) ;
|
||||
#endif
|
||||
|
||||
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) ;
|
||||
|
||||
#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__) ;
|
||||
#endif
|
||||
|
||||
memset (data, 0, items * sizeof (double)) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user