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

include/curl/mprintf.h: add __attribute__ for the prototypes #11589

Closed
wants to merge 3 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Aug 4, 2023

  • if gcc or clang is used
  • if __STDC_VERSION__ >= 199901L, which means greater than C90
  • if not using mingw
  • only if CURL_NO_FMT_CHECKS is not defined

@bagder
Copy link
Member Author

bagder commented Aug 4, 2023

  1. It might be a little "dangerous" to add this in the public header and thus impose this on "everyone"
  2. the infof() and failf() format checks we have are disabled on mingw32. Do we need that here as well?

@github-actions github-actions bot added the tests label Aug 4, 2023
@bagder bagder marked this pull request as ready for review August 6, 2023 20:16
@bagder
Copy link
Member Author

bagder commented Aug 6, 2023

2: yes, mingw will warn on use of the 'z' flag and we can't have that

- if gcc or clang is used
- if __STDC_VERSION__ >= 199901L, which means greater than C90
- if not using mingw
- if CURL_NO_FMT_CHECKS is not defined
@bagder
Copy link
Member Author

bagder commented Aug 7, 2023

I'll take my chances and merge this. If it backfires, we can maybe make the mprintf.h defines only apply when building libcurl.

@bagder bagder closed this in cfe85ca Aug 7, 2023
@bagder bagder deleted the bagder/printf-attributes branch August 9, 2023 08:06
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
- if gcc or clang is used
- if __STDC_VERSION__ >= 199901L, which means greater than C90
- if not using mingw
- if CURL_NO_FMT_CHECKS is not defined

Closes curl#11589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant