From a5be2ffa500581763c172d47640a525542ba9c01 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Mon, 21 Dec 2015 21:41:25 +1000 Subject: [PATCH] Resolve release-mode gcc compilation warning: fread return value ignored --- src/nanosvg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nanosvg.h b/src/nanosvg.h index 75827d8..d5dfc8e 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -2815,7 +2815,7 @@ NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi) fseek(fp, 0, SEEK_SET); data = (char*)malloc(size+1); if (data == NULL) goto error; - fread(data, size, 1, fp); + if (fread(data, 1, size, fp) != size) goto error; data[size] = '\0'; // Must be null terminated. fclose(fp); image = nsvgParse(data, units, dpi);