queso-fuego / uefi-dev

Repo for the UEFI Development Series
The Unlicense
37 stars 3 forks source link

In function ‘add_file_to_esp’: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ #5

Closed abolfazlsamini closed 6 months ago

abolfazlsamini commented 6 months ago

I did the steps described in here but as in the title says when I run make in "UEFI-GPT-image-creator" I get this message image and when I run make in "efi_c" this is what I get image I'm new to this, so I'm not sure what I'm doing wrong I have: Ubuntu 22.04.4 LTS GNU Make 4.3 gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Ubuntu clang version 14.0.0-1ubuntu1.1

queso-fuego commented 6 months ago

This should be fixed now with this commit: 85f254359dd78d77ec751366fbb022aeca7bdb55

https://github.com/queso-fuego/uefi-dev/commit/85f254359dd78d77ec751366fbb022aeca7bdb55

All fread() uses should have their return values used now in conditionals, hopefully that clears up the warnings. Although I don't get them with -Wunused-result on my setup, gcc must have different warnings on different systems, and versions.