osbridge-crc.c:61:21: error: unused variable ‘board’ [-Werror=unused-variable]
osbridge-crc.c:167:2: error: label ‘out_flush’ defined but not used [-Werror=unused-label]
osbridge-crc.c:142:2: error: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Werror=unused-result]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
void usage(int status)
{
FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout;
- struct board_info *board;
fprintf(stream, "Usage: %s [OPTIONS...]\n", progname);
fprintf(stream,
}
errno = 0;
- fread(buf, buflen, 1, infile);
- if (errno != 0) {
+ size_t r = fread(buf, buflen, 1, infile);
+ if (r != 1 && errno != 0) {
ERRS("unable to read from file %s", ifname);
goto err_close_in;
}
res = EXIT_SUCCESS;
- out_flush:
fflush(outfile);
err_close_out: