Skip to content

openssl: fix infof() to avoid compiler warning for %s with null#12196

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/openssl-null-warn
Closed

openssl: fix infof() to avoid compiler warning for %s with null#12196
bagder wants to merge 1 commit into
masterfrom
bagder/openssl-null-warn

Conversation

@bagder

@bagder bagder commented Oct 25, 2023

Copy link
Copy Markdown
Member

vtls/openssl.c: In function ‘ossl_connect_step2’:
../lib/curl_trc.h:120:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
120 | Curl_infof(data, VA_ARGS); } while(0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vtls/openssl.c:4008:5: note: in expansion of macro ‘infof’
4008 | infof(data, "SSL connection using %s / %s / %s / %s",
| ^~~~~
vtls/openssl.c:4008:49: note: format string is defined here
4008 | infof(data, "SSL connection using %s / %s / %s / %s",
| ^~

Follow-up to b6e6d4f

vtls/openssl.c: In function ‘ossl_connect_step2’:
../lib/curl_trc.h:120:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  120 |          Curl_infof(data, __VA_ARGS__); } while(0)
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vtls/openssl.c:4008:5: note: in expansion of macro ‘infof’
 4008 |     infof(data, "SSL connection using %s / %s / %s / %s",
      |     ^~~~~
vtls/openssl.c:4008:49: note: format string is defined here
 4008 |     infof(data, "SSL connection using %s / %s / %s / %s",
      |                                                 ^~

Follow-up to b6e6d4f
@bagder bagder added the TLS label Oct 25, 2023
@bagder bagder closed this in 9ee6da6 Oct 26, 2023
@bagder bagder deleted the bagder/openssl-null-warn branch October 26, 2023 15:44
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.

1 participant