Skip to content

http: fix build with cookies and HSTS disabled #17753

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

Conversation

MarcelRaad
Copy link
Member

All arguments and local variables in http_header_s were unused when both CURL_DISABLE_COOKIES and CURL_DISABLE_HSTS were defined.

@MarcelRaad MarcelRaad requested a review from Copilot June 26, 2025 10:18
@github-actions github-actions bot added the HTTP label Jun 26, 2025
All arguments and local variables in `http_header_s` were unused when
both `CURL_DISABLE_COOKIES` and `CURL_DISABLE_HSTS` were defined.

Closes curl#17753
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a build issue when both CURL_DISABLE_COOKIES and CURL_DISABLE_HSTS are defined by adding preprocessor conditionals to avoid unused variable warnings.

  • Added conditional compilation blocks to bypass unused variables.
  • Introduced void casts for parameters in the disabled configuration.

@MarcelRaad MarcelRaad force-pushed the fix_build_without_cookies_and_hsts branch from b672e27 to 2a9dfe2 Compare June 26, 2025 10:19
@MarcelRaad
Copy link
Member Author

CI failures are failing tests and look unrelated.

@MarcelRaad MarcelRaad merged commit 2a9dfe2 into curl:master Jun 26, 2025
216 of 218 checks passed
@MarcelRaad MarcelRaad deleted the fix_build_without_cookies_and_hsts branch June 26, 2025 10:44
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.

2 participants