Skip to content

Commit

Permalink
try curl patch for warning
Browse files Browse the repository at this point in the history
```
In function 'is_connected',
    inlined from 'cf_he_connect' at /home/runner/work/curl-for-win/curl-for-win/curl/lib/connect.c:906:16:
/home/runner/work/curl-for-win/curl-for-win/curl/lib/connect.c:696:27: warning: '%s' directive argument is null [-Wformat-overflow=]
  696 |     CURL_TRC_CF(data, cf, "%s assess started=%d, result=%d",
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/curl-for-win/curl-for-win/curl/lib/curl_trc.h:123:38: note: in definition of macro 'CURL_TRC_CF'
  123 |          Curl_trc_cf_infof(data, cf, __VA_ARGS__); } while(0)
      |                                      ^~~~~~~~~~~
In file included from /home/runner/work/curl-for-win/curl-for-win/curl/bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:49:
/home/runner/work/curl-for-win/curl-for-win/curl/lib/connect.c: In function 'cf_he_connect':
/home/runner/work/curl-for-win/curl-for-win/curl/lib/connect.c:696:28: note: format string is defined here
  696 |     CURL_TRC_CF(data, cf, "%s assess started=%d, result=%d",
      |                            ^~
make[2]: Leaving directory '/home/runner/work/curl-for-win/curl-for-win/curl/bld'
```
Ref: https://github.com/curl/curl-for-win/actions/runs/6476161689/job/17584426483#step:3:11104
  • Loading branch information
vszakats committed Oct 11, 2023
1 parent c857cae commit 8bb90aa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions curl.dev.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/connect.c b/lib/connect.c
index c7ba3e20e..acb097c4b 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -694,7 +694,7 @@ evaluate:
for(i = 0; i < sizeof(ctx->baller)/sizeof(ctx->baller[0]); i++) {
struct eyeballer *baller = ctx->baller[i];
CURL_TRC_CF(data, cf, "%s assess started=%d, result=%d",
- baller?baller->name:NULL,
+ baller?baller->name:"?",
baller?baller->has_started:0,
baller?baller->result:0);
if(baller && baller->has_started && baller->result) {

0 comments on commit 8bb90aa

Please sign in to comment.