Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7703def

Browse filesBrowse files
author
Chenxi Mao
authored
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>
1 parent f4ed2c6 commit 7703def
Copy full SHA for 7703def

File tree

Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
+1Lines 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

Copy file name to clipboardExpand all lines: Parser/pegen.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ _PyPegen_fill_token(Parser *p)
250250
#define memo_statistics _PyRuntime.parser.memo_statistics
251251

252252
void
253-
_PyPegen_clear_memo_statistics()
253+
_PyPegen_clear_memo_statistics(void)
254254
{
255255
for (int i = 0; i < NSTATISTICS; i++) {
256256
memo_statistics[i] = 0;
257257
}
258258
}
259259

260260
PyObject *
261-
_PyPegen_get_memo_statistics()
261+
_PyPegen_get_memo_statistics(void)
262262
{
263263
PyObject *ret = PyList_New(NSTATISTICS);
264264
if (ret == NULL) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.