mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Stop warning on fgets, simple version
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#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);
|
||||
|
Reference in New Issue
Block a user