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

Warnings found by clang #102711

Closed
parheliamm opened this issue Mar 15, 2023 · 1 comment
Closed

Warnings found by clang #102711

parheliamm opened this issue Mar 15, 2023 · 1 comment
Labels
type-bug An unexpected behavior, bug, or error

Comments

@parheliamm
Copy link
Contributor

parheliamm commented Mar 15, 2023

During build python via clang-15, the below warnings were found:

/home/lge/rpmbuild/BUILD/Python-3.10.9/Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void
/home/lge/rpmbuild/BUILD/Python-3.10.9/Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Above warnings exist from 3.9.x to the latest main branch.

Linked PRs

@parheliamm parheliamm added the type-bug An unexpected behavior, bug, or error label Mar 15, 2023
parheliamm pushed a commit to parheliamm/cpython that referenced this issue Mar 15, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
ambv pushed a commit that referenced this issue Mar 28, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 28, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def)

Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 28, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def)

Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 28, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def)

Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
ambv pushed a commit that referenced this issue Mar 28, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def)

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
ambv pushed a commit that referenced this issue Mar 28, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def)

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
@ambv
Copy link
Contributor

ambv commented Mar 28, 2023

Fixed in 3.10 - 3.12. Thanks! ✨ 🍰 ✨

@ambv ambv closed this as completed Mar 28, 2023
warsaw pushed a commit to warsaw/cpython that referenced this issue Apr 11, 2023
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants