summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-03-28 09:27:30 (GMT)
committerGitHub <noreply@github.com>2023-03-28 09:27:30 (GMT)
commitabd6e97020e5773ce2136228e31930a6d9e82dc0 (patch)
tree5d35883d0436a7fb3116543fffc4edb34d0ea082 /Parser
parent5ba5ce47f6770677d2e126b5360107ad34488210 (diff)
downloadcpython-abd6e97020e5773ce2136228e31930a6d9e82dc0.zip
cpython-abd6e97020e5773ce2136228e31930a6d9e82dc0.tar.gz
cpython-abd6e97020e5773ce2136228e31930a6d9e82dc0.tar.bz2
[3.11] GH-102711: Fix warnings found by clang (GH-102712) (#103075)
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 7703def37e4fa7d25c3d23756de8f527daa4e165) Signed-off-by: Chenxi Mao <chenxi.mao@suse.com> Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 556e50a..87b47ba 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -262,7 +262,7 @@ _PyPegen_fill_token(Parser *p)
static long memo_statistics[NSTATISTICS];
void
-_PyPegen_clear_memo_statistics()
+_PyPegen_clear_memo_statistics(void)
{
for (int i = 0; i < NSTATISTICS; i++) {
memo_statistics[i] = 0;
@@ -270,7 +270,7 @@ _PyPegen_clear_memo_statistics()
}
PyObject *
-_PyPegen_get_memo_statistics()
+_PyPegen_get_memo_statistics(void)
{
PyObject *ret = PyList_New(NSTATISTICS);
if (ret == NULL) {