Fix Clang warnings

This commit is contained in:
evpobr 2020-09-04 09:42:31 +05:00
parent 8993979891
commit e01ee91591
2 changed files with 2 additions and 15 deletions

View File

@ -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 ;

View File

@ -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)) ;