Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aae84a0

Browse files
miss-islingtonChenxi Mao
and
Chenxi Mao
authored
[3.10] GH-102711: Fix warnings found by clang (GH-102712) (#103076)
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 <[email protected]> Co-authored-by: Chenxi Mao <[email protected]>
1 parent d445147 commit aae84a0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``-Wstrict-prototypes`` compiler warnings.

Parser/pegen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,15 +809,15 @@ _PyPegen_fill_token(Parser *p)
809809
static long memo_statistics[NSTATISTICS];
810810

811811
void
812-
_PyPegen_clear_memo_statistics()
812+
_PyPegen_clear_memo_statistics(void)
813813
{
814814
for (int i = 0; i < NSTATISTICS; i++) {
815815
memo_statistics[i] = 0;
816816
}
817817
}
818818

819819
PyObject *
820-
_PyPegen_get_memo_statistics()
820+
_PyPegen_get_memo_statistics(void)
821821
{
822822
PyObject *ret = PyList_New(NSTATISTICS);
823823
if (ret == NULL) {

0 commit comments

Comments
 (0)