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

compiler warnings in http.c when all auth methods disabled #12228

Closed
vszakats opened this issue Oct 29, 2023 · 4 comments
Closed

compiler warnings in http.c when all auth methods disabled #12228

vszakats opened this issue Oct 29, 2023 · 4 comments

Comments

@vszakats
Copy link
Member

vszakats commented Oct 29, 2023

I did this

Built non-Windows (e.g. Linux) curl with CMake options:

-DCURL_DISABLE_BASIC_AUTH=ON
-DCURL_DISABLE_BEARER_AUTH=ON
-DCURL_DISABLE_DIGEST_AUTH=ON
-DCURL_DISABLE_NEGOTIATE_AUTH=ON
-DCURL_DISABLE_NTLM=ON
./curl/lib/http.c:737:12: warning: unused variable 'result' [-Wunused-variable]
  CURLcode result = CURLE_OK;
           ^
./curl/lib/http.c:995:18: warning: variable 'availp' set but not used [-Wunused-but-set-variable]
  unsigned long *availp;
                 ^
./curl/lib/http.c:996:16: warning: variable 'authp' set but not used [-Wunused-but-set-variable]
  struct auth *authp;
               ^

Ref:
0d3956b #11895
e92edfb #11490

This one fixed by: #12262

./curl/lib/http.c:1143:12: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
           ;
           ^

I expected the following

No compiler warnings.

curl/libcurl version

8.5.0-DEV master

operating system

any

@bagder
Copy link
Member

bagder commented Nov 6, 2023

Fixed in #12262

@bagder bagder closed this as completed Nov 6, 2023
@vszakats
Copy link
Member Author

vszakats commented Nov 6, 2023

#12262 fixed one out of 4. #12272 will fix the remaining 3. (though it's fine to continue tracking this there)

@vszakats
Copy link
Member Author

Reopening because of the unfixed warnings.

@vszakats vszakats reopened this Nov 15, 2023
@vszakats
Copy link
Member Author

vszakats commented Nov 16, 2023

Sorry, this is a more correct set of options to trigger the warnings:

-DCURL_DISABLE_BASIC_AUTH=ON
-DCURL_DISABLE_BEARER_AUTH=ON
-DCURL_DISABLE_DIGEST_AUTH=ON
-DCURL_DISABLE_NEGOTIATE_AUTH=ON
-DCURL_DISABLE_NTLM=ON

This is on macOS. Also requires USE_SPNEGO to be inactive on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants