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

build: tidy up deprecation suppression, enable warnings for clang #14789

Closed
wants to merge 15 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Sep 5, 2024

Suppress deprecation warnings the closest to the deprecated code, using
CURL_IGNORE_DEPRECATION(). Then drop build-specific suppressions, and
file-wide ones. The latter is not compatible with Unity mode. Also
replace manual suppressions with a macro to apply to all compilers with
deprecation warning support. Also enable deprecation warnings for clang.

  • curl/curl.h: enable deprecation warnings for clang.

  • docs/examples: stop setting CURL_DISABLE_DEPRECATION with autotools.
    Suppression moved to C-level earlier. Syncs with cmake.
    Follow-up to 5fc61a3 examples: suppress deprecation warnings locally #14123

  • tests/http/clients: stop setting CURL_DISABLE_DEPRECATION in
    autotools. If it becomes necessary in the future, it can be done in
    C via the macro. Syncs with cmake.

  • lib1545: stop setting CURL_DISABLE_DEPRECATION in autotools.
    Drop guard from test source.
    Follow-up to 0f10360 test1545: disable deprecation warnings #12444

  • libtest, unit: replace CURL_DISABLE_DEPRECATION with
    CURL_IGNORE_DEPRECATION().

  • docs/examples: replace pragmas with CURL_IGNORE_DEPRECATION().


w/o whitespace: https://github.com/curl/curl/pull/14789/files?w=1

@vszakats vszakats changed the title build: tidy up CURL_DISABLE_DEPRECATION uses build: tidy up CURL_DISABLE_DEPRECATION use Sep 5, 2024
@github-actions github-actions bot added the tests label Sep 5, 2024
@vszakats vszakats changed the title build: tidy up CURL_DISABLE_DEPRECATION use build: tidy up deprecation suppression, add warnings for clang, MSVC Sep 5, 2024
@vszakats vszakats marked this pull request as draft September 5, 2024 02:27
@vszakats vszakats changed the title build: tidy up deprecation suppression, add warnings for clang, MSVC build: tidy up deprecation suppression, enable warnings for clang Sep 5, 2024
@vszakats vszakats marked this pull request as ready for review September 5, 2024 19:07
@vszakats
Copy link
Member Author

vszakats commented Sep 5, 2024

Tried to enable deprecation warnings for MSVC, but it fell over because CURL_DEPRECATED() is also used in enums which is apparently unsupported by it.

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.

1 participant