Skip to content

Commit 0f0d3a7

Browse files
committed
patch 8.2.5135: running configure gives warnings for main() return type
Problem: Running configure gives warnings for main() return type. Solution: Specify "int" return type. Avoid a few more warnings.
1 parent 3efd65c commit 0f0d3a7

3 files changed

Lines changed: 28 additions & 26 deletions

File tree

src/auto/configure

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7013,7 +7013,7 @@ else
70137013
* Only the first python version used will be switched on.
70147014
*/
70157015
7016-
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
7016+
static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
70177017
{
70187018
int needed = 0;
70197019
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
@@ -7032,7 +7032,7 @@ else
70327032
return !needed;
70337033
}
70347034
7035-
int main(int argc, char** argv)
7035+
int main()
70367036
{
70377037
int not_needed = 0;
70387038
if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
@@ -7079,7 +7079,7 @@ else
70797079
* Only the first python version used will be switched on.
70807080
*/
70817081
7082-
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
7082+
static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
70837083
{
70847084
int needed = 0;
70857085
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
@@ -7098,7 +7098,7 @@ else
70987098
return !needed;
70997099
}
71007100
7101-
int main(int argc, char** argv)
7101+
int main()
71027102
{
71037103
int not_needed = 0;
71047104
if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
@@ -9209,7 +9209,7 @@ else
92099209
# include <stdlib.h>
92109210
# include <stddef.h>
92119211
#endif
9212-
main()
9212+
int main()
92139213
{
92149214
if (sizeof(wchar_t) <= 2)
92159215
exit(1);
@@ -10751,7 +10751,7 @@ else
1075110751
# include <stdlib.h>
1075210752
# include <stddef.h>
1075310753
#endif
10754-
main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
10754+
int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
1075510755
1075610756
_ACEOF
1075710757
if ac_fn_c_try_run "$LINENO"; then :
@@ -11973,7 +11973,7 @@ else
1197311973
# include <stdlib.h>
1197411974
# include <stddef.h>
1197511975
#endif
11976-
main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
11976+
int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
1197711977
_ACEOF
1197811978
if ac_fn_c_try_run "$LINENO"; then :
1197911979
res="OK"
@@ -12050,7 +12050,7 @@ else
1205012050
# include <stdlib.h>
1205112051
# include <stddef.h>
1205212052
#endif
12053-
main()
12053+
int main()
1205412054
{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
1205512055
1205612056
_ACEOF
@@ -12099,7 +12099,7 @@ else
1209912099
# include <stdlib.h>
1210012100
# include <stddef.h>
1210112101
#endif
12102-
main()
12102+
int main()
1210312103
{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
1210412104
1210512105
_ACEOF
@@ -12464,7 +12464,7 @@ else
1246412464
#include <unistd.h>
1246512465
#endif
1246612466
char *dagger[] = { "IFS=pwd", 0 };
12467-
main()
12467+
int main()
1246812468
{
1246912469
char buffer[500];
1247012470
extern char **environ;
@@ -13128,7 +13128,7 @@ else
1312813128
#endif
1312913129
#include <sys/types.h>
1313013130
#include <sys/stat.h>
13131-
main() {struct stat st; exit(stat("configure/", &st) != 0); }
13131+
int main() {struct stat st; exit(stat("configure/", &st) != 0); }
1313213132
1313313133
_ACEOF
1313413134
if ac_fn_c_try_run "$LINENO"; then :
@@ -14282,7 +14282,7 @@ else
1428214282
#ifdef HAVE_INTTYPES_H
1428314283
# include <inttypes.h>
1428414284
#endif
14285-
main() {
14285+
int main() {
1428614286
uint32_t nr1 = (uint32_t)-1;
1428714287
uint32_t nr2 = (uint32_t)0xffffffffUL;
1428814288
if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
@@ -14310,7 +14310,7 @@ bcopy_test_prog='
1431014310
# include <stdlib.h>
1431114311
# include <stddef.h>
1431214312
#endif
14313-
main() {
14313+
int main() {
1431414314
char buf[10];
1431514315
strcpy(buf, "abcdefghi");
1431614316
mch_memmove(buf, buf + 2, 3);

src/configure.ac

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
16951695
* Only the first python version used will be switched on.
16961696
*/
16971697
1698-
int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
1698+
static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
16991699
{
17001700
int needed = 0;
17011701
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
@@ -1714,7 +1714,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
17141714
return !needed;
17151715
}
17161716
1717-
int main(int argc, char** argv)
1717+
int main()
17181718
{
17191719
int not_needed = 0;
17201720
if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
@@ -1741,7 +1741,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
17411741
* Only the first python version used will be switched on.
17421742
*/
17431743
1744-
int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
1744+
static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
17451745
{
17461746
int needed = 0;
17471747
void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
@@ -1760,7 +1760,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
17601760
return !needed;
17611761
}
17621762
1763-
int main(int argc, char** argv)
1763+
int main()
17641764
{
17651765
int not_needed = 0;
17661766
if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
@@ -2420,7 +2420,7 @@ else
24202420
# include <stdlib.h>
24212421
# include <stddef.h>
24222422
#endif
2423-
main()
2423+
int main()
24242424
{
24252425
if (sizeof(wchar_t) <= 2)
24262426
exit(1);
@@ -3218,7 +3218,7 @@ AC_CACHE_CHECK([whether toupper is broken], [vim_cv_toupper_broken],
32183218
# include <stdlib.h>
32193219
# include <stddef.h>
32203220
#endif
3221-
main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
3221+
int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
32223222
]])],[
32233223
vim_cv_toupper_broken=yes
32243224
],[
@@ -3442,7 +3442,7 @@ else
34423442
# include <stdlib.h>
34433443
# include <stddef.h>
34443444
#endif
3445-
main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }])],
3445+
int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }])],
34463446
res="OK", res="FAIL", res="FAIL")
34473447
if test "$res" = "OK"; then
34483448
break
@@ -3481,7 +3481,7 @@ AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo],
34813481
# include <stdlib.h>
34823482
# include <stddef.h>
34833483
#endif
3484-
main()
3484+
int main()
34853485
{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
34863486
]])],[
34873487
vim_cv_terminfo=no
@@ -3507,7 +3507,7 @@ AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgetent
35073507
# include <stdlib.h>
35083508
# include <stddef.h>
35093509
#endif
3510-
main()
3510+
int main()
35113511
{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
35123512
]])],[
35133513
vim_cv_tgetent=zero
@@ -3670,7 +3670,7 @@ AC_CACHE_CHECK([getcwd implementation is broken], [vim_cv_getcwd_broken],
36703670
#include <unistd.h>
36713671
#endif
36723672
char *dagger[] = { "IFS=pwd", 0 };
3673-
main()
3673+
int main()
36743674
{
36753675
char buffer[500];
36763676
extern char **environ;
@@ -3849,7 +3849,7 @@ AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_s
38493849
#endif
38503850
#include <sys/types.h>
38513851
#include <sys/stat.h>
3852-
main() {struct stat st; exit(stat("configure/", &st) != 0); }
3852+
int main() {struct stat st; exit(stat("configure/", &st) != 0); }
38533853
]])],[
38543854
vim_cv_stat_ignores_slash=yes
38553855
],[
@@ -4238,7 +4238,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([
42384238
#ifdef HAVE_INTTYPES_H
42394239
# include <inttypes.h>
42404240
#endif
4241-
main() {
4241+
int main() {
42424242
uint32_t nr1 = (uint32_t)-1;
42434243
uint32_t nr2 = (uint32_t)0xffffffffUL;
42444244
if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
@@ -4260,7 +4260,7 @@ dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.
42604260
# include <stdlib.h>
42614261
# include <stddef.h>
42624262
#endif
4263-
main() {
4263+
int main() {
42644264
char buf[10];
42654265
strcpy(buf, "abcdefghi");
42664266
mch_memmove(buf, buf + 2, 3);

src/version.c

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

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
5135,
737739
/**/
738740
5134,
739741
/**/

0 commit comments

Comments
 (0)