Create correct C protoypes in genMainProc. (#5822)
This avoids a -Wstrict-prototypes warning in the generated C file.
This commit is contained in:
parent
0613f08b24
commit
8d3f477fad
1 changed files with 4 additions and 4 deletions
|
|
@ -889,14 +889,14 @@ proc genMainProc(m: BModule) =
|
||||||
# prevents inlining of the NimMainInner function and dependent
|
# prevents inlining of the NimMainInner function and dependent
|
||||||
# functions, which might otherwise merge their stack frames.
|
# functions, which might otherwise merge their stack frames.
|
||||||
PreMainBody =
|
PreMainBody =
|
||||||
"void PreMainInner() {$N" &
|
"void PreMainInner(void) {$N" &
|
||||||
"\tsystemInit000();$N" &
|
"\tsystemInit000();$N" &
|
||||||
"$1" &
|
"$1" &
|
||||||
"$2" &
|
"$2" &
|
||||||
"$3" &
|
"$3" &
|
||||||
"}$N$N" &
|
"}$N$N" &
|
||||||
"void PreMain() {$N" &
|
"void PreMain(void) {$N" &
|
||||||
"\tvoid (*volatile inner)();$N" &
|
"\tvoid (*volatile inner)(void);$N" &
|
||||||
"\tsystemDatInit000();$N" &
|
"\tsystemDatInit000();$N" &
|
||||||
"\tinner = PreMainInner;$N" &
|
"\tinner = PreMainInner;$N" &
|
||||||
"$4$5" &
|
"$4$5" &
|
||||||
|
|
@ -915,7 +915,7 @@ proc genMainProc(m: BModule) =
|
||||||
|
|
||||||
NimMainProc =
|
NimMainProc =
|
||||||
"N_CDECL(void, NimMain)(void) {$N" &
|
"N_CDECL(void, NimMain)(void) {$N" &
|
||||||
"\tvoid (*volatile inner)();$N" &
|
"\tvoid (*volatile inner)(void);$N" &
|
||||||
"\tPreMain();$N" &
|
"\tPreMain();$N" &
|
||||||
"\tinner = NimMainInner;$N" &
|
"\tinner = NimMainInner;$N" &
|
||||||
"$2" &
|
"$2" &
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue