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

fix: CURLINFO_RESPONSE_CODE datatype #131

Merged
merged 1 commit into from
May 6, 2024

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented May 6, 2024

We should be using long instead of int:
https://curl.se/libcurl/c/CURLINFO_RESPONSE_CODE.html

Error message when compiling:

src/worker.c: In function ‘worker_main’:
src/worker.c:355:57: error: call to ‘_curl_easy_getinfo_err_long’ declared with attribute warning: curl_easy_getinfo expects a pointer to long for this info [-Werror=attribute-warning]
  355 |                                                         curl_easy_getinfo(eh, CURLINFO_RESPONSE_CODE, &http_status_code);
      |                                                         ^

We should be using `long` instead of `int`:
https://curl.se/libcurl/c/CURLINFO_RESPONSE_CODE.html

Error message when compiling:

src/worker.c: In function ‘worker_main’:
src/worker.c:355:57: error: call to ‘_curl_easy_getinfo_err_long’ declared with attribute warning: curl_easy_getinfo expects a pointer to long for this info [-Werror=attribute-warning]
  355 |                                                         curl_easy_getinfo(eh, CURLINFO_RESPONSE_CODE, &http_status_code);
      |                                                         ^
@soedirgo soedirgo linked an issue May 6, 2024 that may be closed by this pull request
2 tasks
@soedirgo soedirgo requested a review from steve-chavez May 6, 2024 08:40
@steve-chavez steve-chavez merged commit 006d49e into master May 6, 2024
26 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.

Fail to compile with the latest libcurl 7.76.1
2 participants