fixes compiler warning (ignoring return value of 'fread', declared with attribute warn_unused_result) and fseek error returns now Signed-off-by: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx> --- arch/x86/boot/compressed/mkpiggy.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c index bcbd36c..78d14d2 100644 --- a/arch/x86/boot/compressed/mkpiggy.c +++ b/arch/x86/boot/compressed/mkpiggy.c @@ -61,8 +61,12 @@ int main(int argc, char *argv[]) if (fseek(f, -4L, SEEK_END)) { perror(argv[1]); + return 1; + } + if (fread(&olen, sizeof olen, 1, f) != 1) { + perror(argv[1]); + return 1; } - fread(&olen, sizeof olen, 1, f); ilen = ftell(f); olen = getle32(&olen); fclose(f); -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html