Commit 2b38900c authored by Jun Zhao's avatar Jun Zhao Committed by Michael Niedermayer

tests/audiomatch: Add return value check for fread.

Check fread return value to fix build warning as "ignoring
return value of ‘fread’"
Signed-off-by: 's avatarJun Zhao <jun.zhao@intel.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c12c2739
......@@ -80,8 +80,10 @@ int main(int argc, char **argv){
data = malloc(datlen * sizeof(*data));
signal = malloc(siglen * sizeof(*signal));
fread(data , 1, datlen, f[0]);
fread(signal, 1, siglen, f[1]);
if (fread(data , 1, datlen, f[0]) != datlen)
return 1;
if (fread(signal, 1, siglen, f[1]) != siglen)
return 1;
datlen /= 2;
siglen /= 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment