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

rustls: Fix two warnings related to number types found by @gvanem #13017

Closed
wants to merge 1 commit into from

Conversation

kpcyrd
Copy link
Contributor

@kpcyrd kpcyrd commented Feb 29, 2024

Followup for #12989 to fix these two warnings:

vtls/rustls.c(295,53): warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned long long') [-Wformat]
  295 |   CURL_TRC_CF(data, cf, "cf_send: %ld plain bytes", plainlen);
      |                                   ~~~               ^~~~~~~~
      |                                   %zu
./curl_trc.h(79,38): note: expanded from macro 'CURL_TRC_CF'
   79 |          Curl_trc_cf_infof(data, cf, __VA_ARGS__); } while(0)
      |                                      ^~~~~~~~~~~
vtls/rustls.c(411,23): warning: incompatible function pointer types passing 'enum rustls_result (void *, const rustls_verify_server_cert_params *)' (aka
      'enum rustls_result (void *, const struct rustls_verify_server_cert_params *)') to parameter of type 'rustls_verify_server_cert_callback' (aka
      'unsigned int (*)(void *, const struct rustls_verify_server_cert_params *)') [-Wincompatible-function-pointer-types-strict]
  411 |       config_builder, cr_verify_none);
      |                       ^~~~~~~~~~~~~~
f:/MinGW32/src/inet/Crypto/RusTls/src\rustls.h(1272,114): note: passing argument to parameter 'callback' here
 1272 |                                                                               rustls_verify_server_cert_callback callback);
      |                                                                                                                  ^
2 warnings generated.

The patch was suggested by @gvanem.

@github-actions github-actions bot added the TLS label Feb 29, 2024
@bagder bagder closed this in ae7ad31 Mar 3, 2024
@bagder
Copy link
Member

bagder commented Mar 3, 2024

Thanks!

@kpcyrd kpcyrd deleted the rustls-warnings branch March 4, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants