From 385f39b05da4277e44a3802dd450949d507accaa Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sun, 4 Dec 2022 19:49:06 +0100 Subject: [PATCH] preventing from [-Werror=unused-result] (3#) --- src/logger/lib/test/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger/lib/test/main.c b/src/logger/lib/test/main.c index 18411f8..a0eee48 100644 --- a/src/logger/lib/test/main.c +++ b/src/logger/lib/test/main.c @@ -40,7 +40,7 @@ int main(void) buffer = malloc(bufferSize + 1); //LOAD jsonFile - fread(buffer, bufferSize, 1, fileBuffer); + if (fread(buffer, bufferSize, 1, fileBuffer) == 0) abort(); //TODO: Make it safe printf("%s\n", buffer);