[U-Boot] [PATCH] bmp_logo: Check return value of fread()

Wolfgang Denk wd at denx.de
Tue Apr 28 01:18:21 CEST 2009


Dear Peter Tyser,

In message <1240606796-32127-1-git-send-email-ptyser at xes-inc.com> you wrote:
> QWRkIGJhc2ljIGVycm9yIGhhbmRsaW5nIHRvIGZyZWFkKCkgZnVuY3Rpb24gY2FsbHMuICBUaGlz
> IHByZXZlbnRzCmNvbXBpbGlsYXRpb24gd2FybmluZ3Mgc3VjaCBhczoKCmJtcF9sb2dvLmM6IElu
> IGZ1bmN0aW9uIOKAmG1haW7igJk6CmJtcF9sb2dvLmM6NzE6IHdhcm5pbmc6IGlnbm9yaW5nIHJl
> dHVybiB2YWx1ZSBvZiDigJhmcmVhZOKAmSwgZGVjbGFyZWQgd2l0aAphdHRyaWJ1dGUgd2Fybl91
> bnVzZWRfcmVzdWx0Ci4uLgoKU2lnbmVkLW9mZi1ieTogUGV0ZXIgVHlzZXIgPHB0eXNlckB4ZXMt
> aW5jLmNvbT4KLS0tCiB0b29scy9ibXBfbG9nby5jIHwgICAzNSArKysrKysrKysrKysrKysrKysr
...

Please do not post base64 encoded messages.  Next time I will ignore
such patches.


> Add basic error handling to fread() function calls.  This prevents
> compililation warnings such as:
> 
> bmp_logo.c: In function `main':
> bmp_logo.c:71: warning: ignoring return value of `fread', declared with
> attribute warn_unused_result
> ...
> 
> Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
> ---
>  tools/bmp_logo.c |   35 ++++++++++++++++++++++-------------
>  1 files changed, 22 insertions(+), 13 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If I have seen further it is by standing on the shoulders of  giants.
              - Isaac Newton, Letter to Robert Hooke, 5 February 1676


More information about the U-Boot mailing list