diff options
author | Chenxi Mao <chenxi.mao@suse.com> | 2023-03-28 08:52:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 08:52:22 (GMT) |
commit | 7703def37e4fa7d25c3d23756de8f527daa4e165 (patch) | |
tree | 990863fcd463b4bf9e3809592db0f160c93ad174 /Parser/pegen.c | |
parent | f4ed2c6ae5915329e49b9f94033ef182400e29fa (diff) | |
download | cpython-7703def37e4fa7d25c3d23756de8f527daa4e165.zip cpython-7703def37e4fa7d25c3d23756de8f527daa4e165.tar.gz cpython-7703def37e4fa7d25c3d23756de8f527daa4e165.tar.bz2 |
GH-102711: Fix warnings found by clang (#102712)
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>
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r-- | Parser/pegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c index 94dd9de..b79ae4c 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -250,7 +250,7 @@ _PyPegen_fill_token(Parser *p) #define memo_statistics _PyRuntime.parser.memo_statistics void -_PyPegen_clear_memo_statistics() +_PyPegen_clear_memo_statistics(void) { for (int i = 0; i < NSTATISTICS; i++) { memo_statistics[i] = 0; @@ -258,7 +258,7 @@ _PyPegen_clear_memo_statistics() } PyObject * -_PyPegen_get_memo_statistics() +_PyPegen_get_memo_statistics(void) { PyObject *ret = PyList_New(NSTATISTICS); if (ret == NULL) { |