Skip to content

Commit bb93fbe

Browse files
author
kalibera
committed
Add arguments to function prototypes.
git-svn-id: https://svn.r-project.org/R/trunk@85673 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent c6201d0 commit bb93fbe

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

configure

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9705,7 +9705,7 @@ cat << \EOF > conftest.mm
97059705
@end
97069706

97079707
int
9708-
main ()
9708+
main (void)
97099709
{
97109710
std::cout << "Hello from C++\n";
97119711
Greeter *obj = [Greeter new];
@@ -9743,7 +9743,7 @@ cat << \EOF > conftest.mm
97439743
@end
97449744

97459745
int
9746-
main ()
9746+
main (void)
97479747
{
97489748
std::cout << "Hello from C++\n";
97499749
Greeter *obj = [Greeter new];
@@ -9776,7 +9776,7 @@ cat << \EOF > conftest.mm
97769776
@end
97779777

97789778
int
9779-
main ()
9779+
main (void)
97809780
{
97819781
std::cout << "Hello from C++\n";
97829782
Greeter *obj = [Greeter new];
@@ -26181,8 +26181,8 @@ for ac_kw in inline __inline__ __inline; do
2618126181
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618226182
/* end confdefs.h. */
2618326183
#ifndef __cplusplus
26184-
static $ac_kw int static_foo () {return 0; }
26185-
$ac_kw int foo () {return 0; }
26184+
static $ac_kw int static_foo (void) {return 0; }
26185+
$ac_kw int foo (void) {return 0; }
2618626186
#endif
2618726187

2618826188
_ACEOF
@@ -27873,7 +27873,7 @@ cat > conftest.c <<EOF
2787327873
#else
2787427874
# define F77_SYMBOL(x) x
2787527875
#endif
27876-
int main () {
27876+
int main (void) {
2787727877
exit(0);
2787827878
}
2787927879
EOF
@@ -27949,7 +27949,7 @@ cat > conftest.c <<EOF
2794927949

2795027950
extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
2795127951

27952-
int main () {
27952+
int main (void) {
2795327953
int a[3] = {17, 237, 2000000000}, b[2], res = 0;
2795427954
double x[3] = {3.14159265, 123.456789, 2.3e34}, z[3];
2795527955
double eps = 1e-6;
@@ -28047,7 +28047,7 @@ typedef union {
2804728047

2804828048
extern void F77_SYMBOL(cftest)(Rcomplex *x);
2804928049

28050-
int main () {
28050+
int main (void) {
2805128051
Rcomplex z[3];
2805228052

2805328053
z[0].r = 3.14159265;
@@ -45356,7 +45356,7 @@ else $as_nop
4535645356
/* end confdefs.h. */
4535745357

4535845358
#include <stdlib.h>
45359-
int main () {
45359+
int main (void) {
4536045360
int *p = calloc(0, sizeof(int));
4536145361
exit(p == 0);
4536245362
}
@@ -45398,7 +45398,7 @@ else $as_nop
4539845398
#include <math.h>
4539945399
#include <stdlib.h>
4540045400
#include "confdefs.h"
45401-
int main () {
45401+
int main (void) {
4540245402
#ifdef HAVE_DECL_ISFINITE
4540345403
exit(isfinite(1./0.) | isfinite(0./0.) | isfinite(-1./0.));
4540445404
#else
@@ -45446,7 +45446,7 @@ else $as_nop
4544645446
#include <math.h>
4544745447
#include <stdlib.h>
4544845448
#include "confdefs.h"
45449-
int main () {
45449+
int main (void) {
4545045450
#ifdef HAVE_LOG1P
4545145451
int k;
4545245452
double d;
@@ -45566,7 +45566,7 @@ else $as_nop
4556645566
#include "confdefs.h"
4556745567
#include <stdlib.h>
4556845568
#include <signal.h>
45569-
int main ()
45569+
int main (void)
4557045570
{
4557145571
struct sigaction sa;
4557245572
siginfo_t si, *ip;
@@ -46184,7 +46184,7 @@ else $as_nop
4618446184
#include <complex.h>
4618546185
#include <stdlib.h>
4618646186
#include "confdefs.h"
46187-
int main () {
46187+
int main (void) {
4618846188
#ifdef HAVE_CTANH
4618946189
volatile double complex z1 = 0;
4619046190
volatile double complex z2 = 365;
@@ -47053,7 +47053,7 @@ cat > conftest.c <<EOF
4705347053
#endif
4705447054
extern void F77_SYMBOL(test1)(int *iflag);
4705547055

47056-
int main () {
47056+
int main (void) {
4705747057
int iflag;
4705847058
F77_SYMBOL(test1)(&iflag);
4705947059
exit(iflag);
@@ -47280,7 +47280,7 @@ void blas_set () {
4728047280
F77_SYMBOL(ztrsv)();
4728147281
#endif
4728247282
}
47283-
int main ()
47283+
int main (void)
4728447284
{
4728547285
exit(0);
4728647286
}
@@ -48075,7 +48075,7 @@ else $as_nop
4807548075
#include <iconv.h>
4807648076
#endif
4807748077

48078-
int main () {
48078+
int main (void) {
4807948079
iconv_t cd;
4808048080
cd = iconv_open("latin1","UTF-8");
4808148081
if(cd == (iconv_t)(-1)) exit(1);
@@ -48169,7 +48169,7 @@ else $as_nop
4816948169
#include <iconv.h>
4817048170
#endif
4817148171

48172-
int main () {
48172+
int main (void) {
4817348173
iconv_t cd;
4817448174
cd = iconv_open("CP1252","UTF-8");
4817548175
if(cd == (iconv_t)(-1)) exit(1);
@@ -48755,7 +48755,7 @@ else $as_nop
4875548755

4875648756
#include <stdlib.h>
4875748757

48758-
int main () {
48758+
int main (void) {
4875948759
UErrorCode status = U_ZERO_ERROR;
4876048760
UCollator *collator;
4876148761
UCharIterator aIter;
@@ -53108,7 +53108,7 @@ else $as_nop
5310853108
#include <stdio.h>
5310953109
#include "confdefs.h"
5311053110

53111-
int main () {
53111+
int main (void) {
5311253112
struct tm *tm;
5311353113
time_t ct = 0; /* required on 64bit AIX */
5311453114

@@ -53705,7 +53705,7 @@ else $as_nop
5370553705
#include <sys/types.h>
5370653706
#include <sys/sysctl.h>
5370753707

53708-
int main () {
53708+
int main (void) {
5370953709
int nm[2] = {CTL_KERN, KERN_USRSTACK};
5371053710
void * base;
5371153711
size_t len = sizeof(void *);

m4/R.m4

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ AC_CACHE_CHECK([for inline], r_cv_c_inline,
486486
for ac_kw in inline __inline__ __inline; do
487487
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
488488
[#ifndef __cplusplus
489-
static $ac_kw int static_foo () {return 0; }
490-
$ac_kw int foo () {return 0; }
489+
static $ac_kw int static_foo (void) {return 0; }
490+
$ac_kw int foo (void) {return 0; }
491491
#endif
492492
])],
493493
[r_cv_c_inline=$ac_kw; break])
@@ -854,7 +854,7 @@ dnl Yes we need to double quote this ...
854854
#else
855855
# define F77_SYMBOL(x) x
856856
#endif
857-
int main () {
857+
int main (void) {
858858
exit(0);
859859
}
860860
EOF]
@@ -927,7 +927,7 @@ dnl Yes we need to double quote this ...
927927
928928
extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
929929
930-
int main () {
930+
int main (void) {
931931
int a[3] = {17, 237, 2000000000}, b[2], res = 0;
932932
double x[3] = {3.14159265, 123.456789, 2.3e34}, z[3];
933933
double eps = 1e-6;
@@ -1022,7 +1022,7 @@ typedef union {
10221022
10231023
extern void F77_SYMBOL(cftest)(Rcomplex *x);
10241024
1025-
int main () {
1025+
int main (void) {
10261026
Rcomplex z[3];
10271027
10281028
z[0].r = 3.14159265;
@@ -1372,7 +1372,7 @@ cat << \EOF > conftest.mm
13721372
@end
13731373
13741374
int
1375-
main ()
1375+
main (void)
13761376
{
13771377
std::cout << "Hello from C++\n";
13781378
Greeter *obj = @<:@Greeter new@:>@;
@@ -1435,7 +1435,7 @@ AC_DEFUN([R_FUNC_CALLOC],
14351435
[AC_CACHE_CHECK([for working calloc], [r_cv_func_calloc_works],
14361436
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
14371437
#include <stdlib.h>
1438-
int main () {
1438+
int main (void) {
14391439
int *p = calloc(0, sizeof(int));
14401440
exit(p == 0);
14411441
}
@@ -1458,7 +1458,7 @@ AC_DEFUN([R_FUNC_ISFINITE],
14581458
#include <math.h>
14591459
#include <stdlib.h>
14601460
#include "confdefs.h"
1461-
int main () {
1461+
int main (void) {
14621462
#ifdef HAVE_DECL_ISFINITE
14631463
exit(isfinite(1./0.) | isfinite(0./0.) | isfinite(-1./0.));
14641464
#else
@@ -1487,7 +1487,7 @@ AC_DEFUN([R_FUNC_LOG1P],
14871487
#include <math.h>
14881488
#include <stdlib.h>
14891489
#include "confdefs.h"
1490-
int main () {
1490+
int main (void) {
14911491
#ifdef HAVE_LOG1P
14921492
int k;
14931493
double d;
@@ -2803,7 +2803,7 @@ dnl Yes we need to double quote this ...
28032803
#endif
28042804
extern void F77_SYMBOL(test1)(int *iflag);
28052805
2806-
int main () {
2806+
int main (void) {
28072807
int iflag;
28082808
F77_SYMBOL(test1)(&iflag);
28092809
exit(iflag);
@@ -3021,7 +3021,7 @@ void blas_set () {
30213021
F77_SYMBOL(ztrsv)();
30223022
#endif
30233023
}
3024-
int main ()
3024+
int main (void)
30253025
{
30263026
exit(0);
30273027
}
@@ -3742,7 +3742,7 @@ AC_DEFUN([R_SYS_POSIX_LEAPSECONDS],
37423742
#include <stdio.h>
37433743
#include "confdefs.h"
37443744
3745-
int main () {
3745+
int main (void) {
37463746
struct tm *tm;
37473747
time_t ct = 0; /* required on 64bit AIX */
37483748
@@ -3871,7 +3871,7 @@ if test "$ac_cv_func_iconv" != no; then
38713871
#include <iconv.h>
38723872
#endif
38733873
3874-
int main () {
3874+
int main (void) {
38753875
iconv_t cd;
38763876
cd = iconv_open("latin1","UTF-8");
38773877
if(cd == (iconv_t)(-1)) exit(1);
@@ -3942,7 +3942,7 @@ int main () {
39423942
#include <iconv.h>
39433943
#endif
39443944
3945-
int main () {
3945+
int main (void) {
39463946
iconv_t cd;
39473947
cd = iconv_open("CP1252","UTF-8");
39483948
if(cd == (iconv_t)(-1)) exit(1);
@@ -4228,7 +4228,7 @@ AC_DEFUN([R_KERN_USRSTACK],
42284228
#include <sys/types.h>
42294229
#include <sys/sysctl.h>
42304230
4231-
int main () {
4231+
int main (void) {
42324232
int nm[2] = {CTL_KERN, KERN_USRSTACK};
42334233
void * base;
42344234
size_t len = sizeof(void *);
@@ -4320,7 +4320,7 @@ AC_DEFUN([R_FUNC_SIGACTION],
43204320
#include "confdefs.h"
43214321
#include <stdlib.h>
43224322
#include <signal.h>
4323-
int main ()
4323+
int main (void)
43244324
{
43254325
struct sigaction sa;
43264326
siginfo_t si, *ip;
@@ -4420,7 +4420,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
44204420
44214421
#include <stdlib.h>
44224422
4423-
int main () {
4423+
int main (void) {
44244424
UErrorCode status = U_ZERO_ERROR;
44254425
UCollator *collator;
44264426
UCharIterator aIter;
@@ -5014,7 +5014,7 @@ AC_DEFUN([R_FUNC_CTANH],
50145014
#include <complex.h>
50155015
#include <stdlib.h>
50165016
#include "confdefs.h"
5017-
int main () {
5017+
int main (void) {
50185018
#ifdef HAVE_CTANH
50195019
volatile double complex z1 = 0;
50205020
volatile double complex z2 = 365;

0 commit comments

Comments
 (0)