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

Fix warning: pointer 'io' may be used after 'fclose' #67

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

kratz00
Copy link
Contributor

@kratz00 kratz00 commented Jun 26, 2023

Fix for the following warning:


/home/kratz00/coding/mojosetup/misc/make_self_extracting.c: In function 'get_file_size':
/home/kratz00/coding/mojosetup/misc/make_self_extracting.c:66:13: warning: pointer 'io' may be used after 'fclose' [-Wuse-after-free]
   66 |             fclose(io); \
      |             ^~~~~~~~~~
/home/kratz00/coding/mojosetup/misc/make_self_extracting.c:78:9: note: in expansion of macro 'FAIL'
   78 |         FAIL("fclose");
      |         ^~~~
/home/kratz00/coding/mojosetup/misc/make_self_extracting.c:77:14: note: call to 'fclose' here
   77 |     else if (fclose(io) == EOF)

@icculus icculus merged commit 6d9161e into icculus:main Jun 27, 2023
@kratz00 kratz00 deleted the double_fclose branch June 27, 2023 16:48
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.

2 participants