Skip to content

Warning: "'fprintf' : format string '%ld' requires an argument of type 'long', but variadic argument 1 has type 'int64_t'" #116386

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

Closed
sobolevn opened this issue Mar 5, 2024 · 2 comments
Assignees
Labels
extension-modules C modules in the Modules dir topic-subinterpreters type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Mar 5, 2024

Bug report

Снимок экрана 2024-03-06 в 00 54 29

Happens in Modules/_xxinterpqueuesmodule.c, spotted on #116371

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error extension-modules C modules in the Modules dir topic-subinterpreters labels Mar 5, 2024
@sobolevn
Copy link
Member Author

sobolevn commented Mar 5, 2024

Also happen locally:

./Modules/_xxinterpqueuesmodule.c:762:22: warning: format specifies type 'long long' but the argument has type 'Py_ssize_t' (aka 'long') [-Wformat]
                qid, queue->items.count);
                     ^~~~~~~~~~~~~~~~~~

I think that I know how to fix it.

@ericsnowcurrently
Copy link
Member

FTR, I fixed this in gh-116369. However, in that PR I used PRId64 one too many times and a new warning showed up. (See #116369 (comment).) @sobolevn's PR fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir topic-subinterpreters type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

2 participants