summaryrefslogtreecommitdiffstats
path: root/Parser/pegen.c
diff options
context:
space:
mode:
authorChenxi Mao <chenxi.mao@suse.com>2023-03-28 08:52:22 (GMT)
committerGitHub <noreply@github.com>2023-03-28 08:52:22 (GMT)
commit7703def37e4fa7d25c3d23756de8f527daa4e165 (patch)
tree990863fcd463b4bf9e3809592db0f160c93ad174 /Parser/pegen.c
parentf4ed2c6ae5915329e49b9f94033ef182400e29fa (diff)
downloadcpython-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.c4
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) {