From d4018192a955b1b5ee6f80c583f33cd994ff04ba Mon Sep 17 00:00:00 2001 From: Brendan Macmillan Date: Sat, 1 Jun 2013 11:00:26 +1000 Subject: [PATCH] Stop warning on fgets, simple version --- jq_test.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/jq_test.c b/jq_test.c index d05b7be..30124a8 100644 --- a/jq_test.c +++ b/jq_test.c @@ -2,7 +2,6 @@ #include #include #include -#include #include "jv.h" #include "execute.h" @@ -40,11 +39,7 @@ static void run_jq_tests(FILE *testdata) { printf("Disassembly:\n"); dump_disassembly(2, bc); printf("\n"); - if (!fgets(buf, sizeof(buf), testdata)) { - invalid++; - printf("%s\n", (errno==0)?"Premature EOF":strerror(errno)); - break; - } + if (!fgets(buf, sizeof(buf), testdata)) { invalid++; break; } jv input = jv_parse(buf); if (!jv_is_valid(input)){ invalid++; continue; } jq_init(bc, input, &jq, JQ_DEBUG_TRACE); -- 2.40.0