Added tests to quiet -Wall compilation

This commit is contained in:
Nirgal Vourgère 2012-02-02 20:22:30 +01:00
parent 21a4229e40
commit b7200c9b57
2 changed files with 9 additions and 2 deletions

View File

@ -51,7 +51,11 @@ int main(int argc, char **argv)
exit(1);
}
fseek(in,0x14,SEEK_SET);
fread(data,1,1,in);
length = fread(data,1,1,in);
if (!length) {
fprintf(stderr, "fread failed at position 0x14\n");
exit(1);
}
if (data[0]==0x01) {
jet4 = 1;
pg_size = 4096;

View File

@ -209,7 +209,10 @@ main(int argc, char **argv)
exit(1);
}
for (i=0;i<header_rows;i++)
fgets(line, MAX_ROW_SIZE, in);
if (!fgets(line, MAX_ROW_SIZE, in)) {
fprintf(stderr, "Error while reading header column #%d. Check -H parameter.\n", i);
exit(1);
}
row = 1;
while (fgets(line, MAX_ROW_SIZE, in)) {