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

build: fix possible -Wformat-overflow in lib557 with test bundle builds #15012

Closed
wants to merge 5 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Sep 22, 2024

Fixes:
```
lib557.c: In function ‘test_float_formatting’:
lib557.c:1408:37: error: ‘%*f’ directive output of 2147483648 bytes exceeds ‘INT_MAX’ [-Werror=format-overflow=]
 1408 |   curl_msnprintf(buf, sizeof(buf), "%*f", INT_MIN, 9.1);
      |                                     ^~~
lib557.c:1408:3: note: ‘curl_msnprintf’ output 2147483649 bytes
 1408 |   curl_msnprintf(buf, sizeof(buf), "%*f", INT_MIN, 9.1);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Ref: https://app.circleci.com/pipelines/github/curl/curl/10226/workflows/87642ee9-cda6-4916-8206-c82aac5f595e/jobs/107669?invite=true#step-106-40996_46
It's not enabled by a picky warning, so there is no use of disabling
it there. These options only get used with picky warnings enabled.
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.

gcc-9 printf format warnings in lib557.c
1 participant