Skip to content

suppress clang-tidy warnings re: Annex K functions #983

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

etwoo
Copy link
Contributor

@etwoo etwoo commented Jul 23, 2025

Quick follow-up to #981

Suppress clang-tidy's clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling check, which produces false positives for functions like fprintf(). Further, this check recommends adoption of C11 Annex K functions that are unavailable under many libc's (including glibc) and controversial amongst experts.

Apologies for not including this as part of #981. I only realized after merging that although this check does not currently generate false positives on the ada codebase, it would be confusing for contributors to have future PRs blocked because of innocent/innocuous use of functions like fprintf() and memset().

For additional background:

Suppress clang-tidy's insecureAPI.DeprecatedOrUnsafeBufferHandling
check, which produces false positives for functions like fprintf().
Further, this check recommends adoption of C11 Annex K functions that
are unavailable under many libc's (including glibc) and controversial
amongst experts.

For additional background:

    https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1969.htm
    https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2336.pdf
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88700
    https://gcc.gnu.org/pipermail/gcc/2019-December/231070.html
    llvm/llvm-project#64027
@anonrig anonrig merged commit 5be04e1 into ada-url:main Jul 23, 2025
48 checks passed
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.

3 participants