dtsr: resolve all 12 compiler warnings.

This commit is contained in:
Peter Howkins
2015-01-05 16:54:12 +00:00
parent 466b8d0df5
commit 3fab71345b
6 changed files with 34 additions and 14 deletions

View File

@@ -467,7 +467,10 @@ static void init_treebase (void)
*/
else {
no_huffcode_file = FALSE;
fgets (filebuf, sizeof (filebuf) - 1, instream_huf);
if(NULL == fgets (filebuf, sizeof (filebuf) - 1, instream_huf)) {
fprintf (stderr, "No first line in file\n");
exit(2);
}
/* discard this first line (don't need id stamp) */
while (fgets (filebuf, sizeof (filebuf) - 1, instream_huf)
!= NULL) {