Skip to content

Commit 54b6352

Browse files
committed
patch 7.4.2254
Problem: Compiler warnings in MzScheme code. Solution: Add UNUSED. Remove unreachable code.
1 parent 78c7e27 commit 54b6352

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/if_mzsch.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,13 @@ static intptr_t _tls_index = 0;
10081008
# endif
10091009
#endif
10101010

1011+
/*
1012+
* mzscheme_main() is called early in main().
1013+
* We may call scheme_main_setup() which calls mzscheme_env_main() which then
1014+
* trampolines into vim_main2(), which never returns.
1015+
*/
10111016
int
1012-
mzscheme_main()
1017+
mzscheme_main(void)
10131018
{
10141019
int argc = 0;
10151020
char *argv = NULL;
@@ -1036,9 +1041,8 @@ mzscheme_main()
10361041
}
10371042

10381043
static int
1039-
mzscheme_env_main(Scheme_Env *env, int argc, char **argv)
1044+
mzscheme_env_main(Scheme_Env *env, int argc UNUSED, char **argv UNUSED)
10401045
{
1041-
int vim_main_result;
10421046
#ifdef TRAMPOLINED_MZVIM_STARTUP
10431047
/* Scheme has created the environment for us */
10441048
environment = env;
@@ -1055,17 +1059,10 @@ mzscheme_env_main(Scheme_Env *env, int argc, char **argv)
10551059
# endif
10561060
#endif
10571061

1058-
/* mzscheme_main is called as a trampoline from main.
1059-
* We trampoline into vim_main2
1060-
* Passing argc, argv through from mzscheme_main
1061-
*/
1062-
vim_main_result = vim_main2();
1063-
#if !defined(TRAMPOLINED_MZVIM_STARTUP) && defined(MZ_PRECISE_GC)
1064-
/* releasing dummy */
1065-
MZ_GC_REG();
1066-
MZ_GC_UNREG();
1067-
#endif
1068-
return vim_main_result;
1062+
vim_main2();
1063+
/* not reached, vim_main2() will loop until exit() */
1064+
1065+
return 0;
10691066
}
10701067

10711068
static Scheme_Object*

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2254,
766768
/**/
767769
2253,
768770
/**/

0 commit comments

Comments
 (0)