Skip to content

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

@vszakats

Description

@vszakats

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions