bootstrap: Check result of fread Removes -Wunused-result warning. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index b7658ab..9bc94bb 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c
@@ -1004,7 +1004,11 @@ if (verbose) { printk("\nEncoding %s [%d bytes]\n", name, size ); } - fread( dict + dicthead, size, 1, file ); + if (fread( dict + dicthead, size, 1, file ) != 1) { + printk("panic: Can't read dictionary.\n"); + fclose(file); + exit(1); + } PUSH( pointer2cell(dict + dicthead) ); PUSH( size ); dicthead += size;