Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate warnings caused by the result of fread #49

Merged
merged 2 commits into from
Jul 12, 2022
Merged

Eliminate warnings caused by the result of fread #49

merged 2 commits into from
Jul 12, 2022

Conversation

alanjian85
Copy link
Contributor

In gcc 9.4.0, the fread() function marked with the __wur macro generates an unused-result warning when the result is not used, and due to the -Werror flag in Makefile, it became a compilation error in facebooc (at least on my computer). I added an error handling mechanism that would help when there are errors reading the file.

@jserv jserv changed the title Eliminate unused-result warnings caused by ignoring the result of fread() Eliminate warnings caused by the result of fread Jul 12, 2022
@jserv jserv merged commit ab6a0fe into jserv:master Jul 12, 2022
@jserv
Copy link
Owner

jserv commented Jul 12, 2022

Thank @alanjian85 for contributing.
Please check this https://cbea.ms/git-commit/ as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants