Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Oct 7, 2025

Found via -Wformat-signedness:

docs/examples/sessioninfo.c: In function 'wrfu':
docs/examples/sessioninfo.c:75:53: error: field precision specifier '.*' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
  fprintf(stderr, "Certificate #%u: %.*s", i, dn.size, dn.data);
                                      ^

Ref: https://github.com/curl/curl/actions/runs/18320729052/job/52172864438?pr=18343#step:13:30
Ref: https://github.com/curl/curl/actions/runs/18320729095/job/52172886899?pr=18343#step:19:27

Also:

  • drop unnecessary parenthesis.
  • scope variables.

Ref: #18343

@vszakats vszakats changed the title examples/sessioninfo: cast printf mask length to int, scope variables examples/sessioninfo: cast printf mask length to int Oct 7, 2025
@vszakats vszakats changed the title examples/sessioninfo: cast printf mask length to int examples/sessioninfo: cast printf string mask length to int Oct 7, 2025
Also drop unnecessary parenthesis.

Found via `-Wformat-signedness`:
```
docs/examples/sessioninfo.c: In function 'wrfu':
docs/examples/sessioninfo.c:75:53: error: field precision specifier '.*' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
  fprintf(stderr, "Certificate #%u: %.*s", i, dn.size, dn.data);
                                      ^
```
Ref: https://github.com/curl/curl/actions/runs/18320729052/job/52172864438?pr=18343#step:13:30

Ref: curl#18343
@vszakats vszakats closed this in 1103ccb Oct 7, 2025
@vszakats vszakats deleted the sessioninfo branch October 7, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant