Skip to content

http: fix build with cookies and HSTS disabled#17753

Merged
MarcelRaad merged 1 commit intocurl:masterfrom
MarcelRaad:fix_build_without_cookies_and_hsts
Jun 26, 2025
Merged

http: fix build with cookies and HSTS disabled#17753
MarcelRaad merged 1 commit intocurl:masterfrom
MarcelRaad:fix_build_without_cookies_and_hsts

Conversation

@MarcelRaad
Copy link
Copy Markdown
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
Copy Markdown

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.

Comment thread lib/http.c
@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
Copy Markdown
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.

3 participants