Not doing so was flagged by newer build tooling:
makeindex.c:127:9: error: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
printf( "%ld, ", offset );
/* Determine offset of next line */
- fgets( textbuff, TBSIZE, fp);
+ if (fgets( textbuff, TBSIZE, fp) == NULL) {
+ if (ferror(fp)) {
+ perror("fgets when determining line offset");
+ return 1;
+ }
+ }
offset += strlen(textbuff);
cur_line++;
}