Makes derf happy by fixing a warning in test_coef_coder
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 17 Jan 2013 02:27:52 +0000 (21:27 -0500)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Thu, 17 Jan 2013 02:27:52 +0000 (21:27 -0500)
src/tests/test_coef_coder.c

index d29c1cd..821d312 100644 (file)
@@ -209,7 +209,8 @@ int main(int argc, char **argv){
     }
     for(i=0;i<len;i++)
       for(j=0;j<N;j++)
-        fscanf(file,"%d ",&X[i*N+j]);
+        if(fscanf(file,"%d",&X[i*N+j])!=1)
+          return 1;
     bits = run_pvq(X,len,N);
     fprintf(stderr, "Coded file with %f bits/sample (%f bits/vector)\n",bits/(float)len/N,bits/(float)len);
     fclose(file);