From: Ilya Barygin Date: Sat, 22 Mar 2014 22:16:49 +0100 Subject: FTBFS with fread Fix FTBFS due to unused return value of fread in anim.c. Check that fread actually returns a value under all circumstances. Bug: https://bugs.debian.org/552022 Forwarded: no --- utils/anim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/anim.c b/utils/anim.c index 8a2871f..ca631a5 100644 --- a/utils/anim.c +++ b/utils/anim.c @@ -32,7 +32,8 @@ void write_file(FILE * out, char *filename) data = (Uint8 *) malloc(theStat.st_size); size = theStat.st_size; fwrite(&size, sizeof(Uint32), 1, out); - fread(data, theStat.st_size, 1, in); + if (fread(data, theStat.st_size, 1, in) != 1) + errorcc("Error reading from file, ", filename); fwrite(data, theStat.st_size, 1, out); free(data); fclose(in);