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

GH-102711: Fix warnings found by clang #102712

Merged
merged 1 commit into from
Mar 28, 2023
Merged

GH-102711: Fix warnings found by clang #102712

merged 1 commit into from
Mar 28, 2023

Conversation

parheliamm
Copy link
Contributor

@parheliamm parheliamm commented Mar 15, 2023

There are some warnings if build python via clang:

/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

Fix it to make clang happy.

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Mar 15, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@thesamesam
Copy link
Contributor

This looks fine and is analogous to e35ca41 / #99086.

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>
@parheliamm
Copy link
Contributor Author

@thesamesam @pablogsal @lysnikolaou
Would you please review the new patch set?

Any feedback would be appreciated.

Chenxi

@ambv ambv changed the title [3.9][3.10][3.11] GH-102711: Fix warnings found by clang GH-102711: Fix warnings found by clang Mar 28, 2023
@ambv ambv added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Mar 28, 2023
@ambv ambv merged commit 7703def into python:main Mar 28, 2023
@miss-islington
Copy link
Contributor

Thanks @parheliamm for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-103075 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Mar 28, 2023
@ambv ambv added needs backport to 3.9 only security fixes needs backport to 3.11 only security fixes labels Mar 28, 2023
@miss-islington
Copy link
Contributor

Thanks @parheliamm for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-103076 is a backport of this pull request to the 3.10 branch.

@miss-islington
Copy link
Contributor

Thanks @parheliamm for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Mar 28, 2023
@miss-islington
Copy link
Contributor

Sorry, @parheliamm and @ambv, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7703def37e4fa7d25c3d23756de8f527daa4e165 3.9

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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 pull request 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 pull request 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 ambv removed the needs backport to 3.9 only security fixes label Mar 28, 2023
@ambv
Copy link
Contributor

ambv commented Mar 28, 2023

Actually, forget about the 3.9 backport as this isn't security-related.

ambv pushed a commit that referenced this pull request 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 pull request 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>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 LTO + PGO 3.11 has failed when building commit abd6e97.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/968/builds/741) and take a look at the build logs.
  4. Check if the failure is related to this commit (abd6e97) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/968/builds/741

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

413 tests OK.

10 slowest tests:

  • test_tools: 7 min 27 sec
  • test_concurrent_futures: 2 min 31 sec
  • test_multiprocessing_spawn: 1 min 55 sec
  • test_multiprocessing_fork: 1 min 21 sec
  • test_multiprocessing_forkserver: 1 min 18 sec
  • test_asyncio: 1 min
  • test_tokenize: 51.0 sec
  • test_signal: 48.0 sec
  • test_unparse: 40.1 sec
  • test_io: 35.8 sec

1 test altered the execution environment:
test_asyncio

20 tests skipped:
test_devpoll test_gdb test_idle test_ioctl test_kqueue
test_launcher test_msilib test_smtpnet test_ssl test_startfile
test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly
test_turtle test_winconsoleio test_winreg test_winsound
test_zipfile64

Total duration: 11 min 16 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.11.edelsohn-rhel-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/psm_ace6d810'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.11.edelsohn-rhel-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/psm_30b5d66e'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.11.edelsohn-rhel-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/psm_ab68f943'

warsaw pushed a commit to warsaw/cpython that referenced this pull request 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
needs backport to 3.11 only security fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants