From: Brendan Macmillan Date: Sat, 1 Jun 2013 01:00:26 +0000 (+1000) Subject: Stop warning on fgets, simple version X-Git-Tag: jq-1.4~114^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4018192a955b1b5ee6f80c583f33cd994ff04ba;p=jq Stop warning on fgets, simple version --- 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);