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

Skip to content

Commit 53e7fd7

Browse files
committed
Fix prototypes generated by makesetup, so they include '(void)' rather than
empty argumentlists.
1 parent a534594 commit 53e7fd7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/config.c.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
2020

2121
/* -- ADDMODULE MARKER 1 -- */
2222

23-
extern void PyMarshal_Init();
24-
extern void initimp();
23+
extern void PyMarshal_Init(void);
24+
extern void initimp(void);
2525

2626
struct _inittab _PyImport_Inittab[] = {
2727

Modules/makesetup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Copying config.c.in to config.c:
2424
# - insert an identifying comment at the start
2525
# - for each <module> mentioned in Setup before *noconfig*:
26-
# + insert 'extern void init<module>();' before MARKER 1
26+
# + insert 'extern void init<module>(void);' before MARKER 1
2727
# + insert '{"<module>", initmodule},' before MARKER 2
2828
#
2929
# Copying Makefile.pre to Makefile:
@@ -234,7 +234,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
234234
INITBITS=
235235
for mod in $MODS
236236
do
237-
EXTDECLS="${EXTDECLS}extern void init$mod();$NL"
237+
EXTDECLS="${EXTDECLS}extern void init$mod(void);$NL"
238238
INITBITS="${INITBITS} {\"$mod\", init$mod},$NL"
239239
done
240240

0 commit comments

Comments
 (0)