mmorise / World

A high-quality speech analysis, manipulation and synthesis system
http://www.kisc.meiji.ac.jp/~mmorise/world/english
Other
1.17k stars 251 forks source link

Fix -Wunused-result warnings. #45

Closed mjansche closed 6 years ago

mjansche commented 7 years ago

I noticed that the return value of fread() wasn't being checked everywhere. This could mean that problems reading a file might go unnoticed. I've added some basic comparisons of the return values.

mmorise commented 7 years ago

I think that it seems redundant because the check with data_check[] works well. The check in GetAudioLength() also seems redundant. In cases where the function CheckHeader() returns 1, fread() after CheckHeader() always returns the appropriate value. Since wavread() and GetAudioLength() first call CheckHeader(), more error check is not required.