summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJonathon Reinhart <Jonathon.Reinhart@gmail.com>2018-02-10 04:49:36 (GMT)
committerJonathon Reinhart <Jonathon.Reinhart@gmail.com>2018-02-11 23:13:26 (GMT)
commit090107e5282cdbff7481a52467b9abcba5a9652d (patch)
treefa27dd177c482671e9c9487c7e0bb9c961967310 /test
parent8c41b52ca3d502bfd0444bf2640e345fb7b2ae9d (diff)
downloadSCons-090107e5282cdbff7481a52467b9abcba5a9652d.zip
SCons-090107e5282cdbff7481a52467b9abcba5a9652d.tar.gz
SCons-090107e5282cdbff7481a52467b9abcba5a9652d.tar.bz2
Replace all instances of `int main()` with `int main(void)`
Diffstat (limited to 'test')
-rw-r--r--test/CacheDir/up-to-date-q.py2
-rw-r--r--test/Case.py2
-rw-r--r--test/Configure/VariantDir-SConscript.py2
-rw-r--r--test/Configure/VariantDir.py2
-rw-r--r--test/Configure/VariantDir2.py2
-rw-r--r--test/Configure/basic.py2
-rw-r--r--test/Configure/build-fail.py2
-rw-r--r--test/Configure/clean.py2
-rw-r--r--test/Configure/custom-tests.py6
-rw-r--r--test/Configure/help.py2
-rw-r--r--test/FindSourceFiles.py2
-rw-r--r--test/Interactive/added-include.py4
-rw-r--r--test/Interactive/implicit-VariantDir.py4
-rw-r--r--test/LINK/VersionedLib-VariantDir.py2
-rw-r--r--test/LINK/VersionedLib-j2.py2
-rw-r--r--test/LINK/VersionedLib-subdir.py2
-rw-r--r--test/Libs/Library.py2
-rw-r--r--test/MSVC/pch-basics.py2
-rw-r--r--test/MSVC/pch-spaces-subdir.py2
-rw-r--r--test/MSVS/CPPPATH-Dirs.py2
-rw-r--r--test/QT/CPPPATH-appended.py2
-rw-r--r--test/QT/CPPPATH.py2
-rw-r--r--test/QT/QTFLAGS.py4
-rw-r--r--test/QT/empty-env.py2
-rw-r--r--test/QT/manual.py2
-rw-r--r--test/QT/moc-from-header.py2
-rw-r--r--test/QT/reentrant.py2
-rw-r--r--test/RPATH.py2
-rw-r--r--test/YACC/live.py4
29 files changed, 35 insertions, 35 deletions
diff --git a/test/CacheDir/up-to-date-q.py b/test/CacheDir/up-to-date-q.py
index 275b127..f0e3962 100644
--- a/test/CacheDir/up-to-date-q.py
+++ b/test/CacheDir/up-to-date-q.py
@@ -55,7 +55,7 @@ test = TestSCons.TestSCons()
test.subdir('cache', 'alpha', 'beta')
foo_c = """
-int main(){ return 0; }
+int main(void){ return 0; }
"""
sconstruct = """
diff --git a/test/Case.py b/test/Case.py
index fb6821d..193da54 100644
--- a/test/Case.py
+++ b/test/Case.py
@@ -43,7 +43,7 @@ test.write('main.c', """\
void foo();
void bar();
-int main() {
+int main(void) {
foo();
bar();
exit (0);
diff --git a/test/Configure/VariantDir-SConscript.py b/test/Configure/VariantDir-SConscript.py
index c82778a..deb7b8f 100644
--- a/test/Configure/VariantDir-SConscript.py
+++ b/test/Configure/VariantDir-SConscript.py
@@ -96,7 +96,7 @@ test.write(['sub', 'TestProgram.c'], """\
#include "TestProgram.h"
#include <stdio.h>
-int main() {
+int main(void) {
printf( "Hello\\n" );
}
""")
diff --git a/test/Configure/VariantDir.py b/test/Configure/VariantDir.py
index 01df276..23a4b14 100644
--- a/test/Configure/VariantDir.py
+++ b/test/Configure/VariantDir.py
@@ -63,7 +63,7 @@ env.Program( 'TestProgram', 'TestProgram.c' )
test.write('TestProgram.c', """\
#include <stdio.h>
-int main() {
+int main(void) {
printf( "Hello\\n" );
}
""")
diff --git a/test/Configure/VariantDir2.py b/test/Configure/VariantDir2.py
index 62b832f..ffe6525 100644
--- a/test/Configure/VariantDir2.py
+++ b/test/Configure/VariantDir2.py
@@ -41,7 +41,7 @@ SConscript('SConscript', variant_dir='build', src='.')
test.write('SConscript', """\
env = Environment()
config = env.Configure(conf_dir='sconf', log_file='config.log')
-config.TryRun("int main() {}", ".c")
+config.TryRun("int main(void) {}", ".c")
config.Finish()
""")
diff --git a/test/Configure/basic.py b/test/Configure/basic.py
index 4344941..4038a45 100644
--- a/test/Configure/basic.py
+++ b/test/Configure/basic.py
@@ -61,7 +61,7 @@ env.Program( 'TestProgram', 'TestProgram.c' )
test.write('TestProgram.c', """\
#include <stdio.h>
-int main() {
+int main(void) {
printf( "Hello\\n" );
}
""")
diff --git a/test/Configure/build-fail.py b/test/Configure/build-fail.py
index 74609f6..218cf18 100644
--- a/test/Configure/build-fail.py
+++ b/test/Configure/build-fail.py
@@ -58,7 +58,7 @@ def _check(context):
result = context.TryRun('''
#include "%s"
- int main() { return 0; }
+ int main(void) { return 0; }
''' % inc, '.cpp')[0]
if result:
import sys
diff --git a/test/Configure/clean.py b/test/Configure/clean.py
index bb15165..d7a5dc7 100644
--- a/test/Configure/clean.py
+++ b/test/Configure/clean.py
@@ -53,7 +53,7 @@ env.Program( 'TestProgram', 'TestProgram.c' )
test.write('TestProgram.c', """\
#include <stdio.h>
-int main() {
+int main(void) {
printf( "Hello\\n" );
}
""")
diff --git a/test/Configure/custom-tests.py b/test/Configure/custom-tests.py
index 7bb2366..6362e25 100644
--- a/test/Configure/custom-tests.py
+++ b/test/Configure/custom-tests.py
@@ -41,12 +41,12 @@ CR = test.CR # cached rebuild (up to date)
NCF = test.NCF # non-cached build failure
CF = test.CF # cached build failure
-compileOK = '#include <stdio.h>\\nint main() {printf("Hello");return 0;}'
+compileOK = '#include <stdio.h>\\nint main(void) {printf("Hello");return 0;}'
compileFAIL = "syntax error"
linkOK = compileOK
-linkFAIL = "void myFunc(); int main() { myFunc(); }"
+linkFAIL = "void myFunc(); int main(void) { myFunc(); }"
runOK = compileOK
-runFAIL = "int main() { return 1; }"
+runFAIL = "int main(void) { return 1; }"
test.write('pyAct.py', """\
from __future__ import print_function
diff --git a/test/Configure/help.py b/test/Configure/help.py
index f42088b..32f74da 100644
--- a/test/Configure/help.py
+++ b/test/Configure/help.py
@@ -53,7 +53,7 @@ env.Program( 'TestProgram', 'TestProgram.c' )
test.write('TestProgram.c', """\
#include <stdio.h>
-int main() {
+int main(void) {
printf( "Hello\\n" );
}
""")
diff --git a/test/FindSourceFiles.py b/test/FindSourceFiles.py
index 88b9d7e..62b906c 100644
--- a/test/FindSourceFiles.py
+++ b/test/FindSourceFiles.py
@@ -63,7 +63,7 @@ foo_c = env.Substfile('foo.c.in', SUBST_DICT = {'__A__' : '0' })
foo = env.Program(foo_c)
""")
-test.write('src/foo.c.in', """ int main() { return __A__;}
+test.write('src/foo.c.in', """ int main(void) { return __A__;}
""")
test.run(arguments = 'package')
diff --git a/test/Interactive/added-include.py b/test/Interactive/added-include.py
index 86a473d..e65cb14 100644
--- a/test/Interactive/added-include.py
+++ b/test/Interactive/added-include.py
@@ -41,7 +41,7 @@ test.write('foo.h.in', """
test.write('foo.c', """
#include <stdio.h>
-int main()
+int main(void)
{
printf("foo.c\\n");
return 0;
@@ -81,7 +81,7 @@ test.write('foo.c', """
#include <stdio.h>
-int main()
+int main(void)
{
printf("%s\\n", FOO_STRING);
return 0;
diff --git a/test/Interactive/implicit-VariantDir.py b/test/Interactive/implicit-VariantDir.py
index 5ef4583..fc52080 100644
--- a/test/Interactive/implicit-VariantDir.py
+++ b/test/Interactive/implicit-VariantDir.py
@@ -74,7 +74,7 @@ test.write(['src', 'foo.c'], """
#define FOO_PRINT_STRING "Hello from foo.c"
-int main()
+int main(void)
{
printf(FOO_PRINT_STRING "\\n");
return 0;
@@ -115,7 +115,7 @@ test.write(['src', 'foo.c'], """
#include "foo.h"
#include <stdio.h>
-int main()
+int main(void)
{
printf(FOO_PRINT_STRING "\\n");
return 0;
diff --git a/test/LINK/VersionedLib-VariantDir.py b/test/LINK/VersionedLib-VariantDir.py
index 0350c6e..340fee0 100644
--- a/test/LINK/VersionedLib-VariantDir.py
+++ b/test/LINK/VersionedLib-VariantDir.py
@@ -65,7 +65,7 @@ test.write(['src','bin','main.c'], """
__declspec(dllimport)
#endif
int foo();
-int main()
+int main(void)
{
return foo();
}
diff --git a/test/LINK/VersionedLib-j2.py b/test/LINK/VersionedLib-j2.py
index 4646a37..ed3b7ff 100644
--- a/test/LINK/VersionedLib-j2.py
+++ b/test/LINK/VersionedLib-j2.py
@@ -57,7 +57,7 @@ test.write('main.c', """
__declspec(dllimport)
#endif
int foo();
-int main() { return foo(); }
+int main(void) { return foo(); }
""")
test.write('SConstruct', """
diff --git a/test/LINK/VersionedLib-subdir.py b/test/LINK/VersionedLib-subdir.py
index 91f3011..2271a54 100644
--- a/test/LINK/VersionedLib-subdir.py
+++ b/test/LINK/VersionedLib-subdir.py
@@ -58,7 +58,7 @@ test.write('main.c', """
__declspec(dllimport)
#endif
int foo();
-int main()
+int main(void)
{
return foo();
}
diff --git a/test/Libs/Library.py b/test/Libs/Library.py
index b603926..50fe68b 100644
--- a/test/Libs/Library.py
+++ b/test/Libs/Library.py
@@ -152,7 +152,7 @@ void nrd() {
test.write('uses-nrd.c', r"""
void nrd();
-int main() {
+int main(void) {
nrd();
return 0;
}
diff --git a/test/MSVC/pch-basics.py b/test/MSVC/pch-basics.py
index 45735ed..ebee0da 100644
--- a/test/MSVC/pch-basics.py
+++ b/test/MSVC/pch-basics.py
@@ -39,7 +39,7 @@ test.skip_if_not_msvc()
test.write('Main.cpp', """\
#include "Precompiled.h"
-int main()
+int main(void)
{
return testf();
}
diff --git a/test/MSVC/pch-spaces-subdir.py b/test/MSVC/pch-spaces-subdir.py
index 3a65b44..65595fc 100644
--- a/test/MSVC/pch-spaces-subdir.py
+++ b/test/MSVC/pch-spaces-subdir.py
@@ -39,7 +39,7 @@ test.skip_if_not_msvc()
test.write('Main.cpp', """\
#include "Precompiled.h"
-int main()
+int main(void)
{
return testf();
}
diff --git a/test/MSVS/CPPPATH-Dirs.py b/test/MSVS/CPPPATH-Dirs.py
index 45ec846..53c7a8b 100644
--- a/test/MSVS/CPPPATH-Dirs.py
+++ b/test/MSVS/CPPPATH-Dirs.py
@@ -68,7 +68,7 @@ test.write('SConstruct', SConscript_contents)
test.write('main.cpp', """\
#include <stdio.h>
-int main() {
+int main(void) {
printf("hello, world!\\n");
}
""")
diff --git a/test/QT/CPPPATH-appended.py b/test/QT/CPPPATH-appended.py
index 2780921..98baad8 100644
--- a/test/QT/CPPPATH-appended.py
+++ b/test/QT/CPPPATH-appended.py
@@ -57,7 +57,7 @@ env.Program(target = 'aaa', source = 'aaa.cpp')
test.write(['sub', 'aaa.cpp'], r"""
#include "aaa.h"
-int main() { aaa(); return 0; }
+int main(void) { aaa(); return 0; }
""")
test.write(['sub', 'aaa.h'], r"""
diff --git a/test/QT/CPPPATH.py b/test/QT/CPPPATH.py
index 4ea42bd..5de41d9 100644
--- a/test/QT/CPPPATH.py
+++ b/test/QT/CPPPATH.py
@@ -47,7 +47,7 @@ env.Program(target = 'aaa', source = 'aaa.cpp', CPPPATH=['$CPPPATH', './local_in
test.write('aaa.cpp', r"""
#include "aaa.h"
-int main() { aaa(); return 0; }
+int main(void) { aaa(); return 0; }
""")
test.write('aaa.h', r"""
diff --git a/test/QT/QTFLAGS.py b/test/QT/QTFLAGS.py
index 8d266ad..61a1d87 100644
--- a/test/QT/QTFLAGS.py
+++ b/test/QT/QTFLAGS.py
@@ -127,7 +127,7 @@ test.write(['work1', 'main.cpp'], """
#include "uic-another_ui_file.hpp"
void mocFromCpp();
-int main() {
+int main(void) {
mocFromH();
mocFromCpp();
an_ui_file();
@@ -189,7 +189,7 @@ env2.Program('main.cpp')
""" % {'QTDIR':QT})
test.write(['work2', 'main.cpp'], """
-int main() { return 0; }
+int main(void) { return 0; }
""")
# Ignore stderr, because if Qt is not installed,
diff --git a/test/QT/empty-env.py b/test/QT/empty-env.py
index 77547e7..b7867e5 100644
--- a/test/QT/empty-env.py
+++ b/test/QT/empty-env.py
@@ -46,7 +46,7 @@ env.Program('main', 'main.cpp', CPPDEFINES=['FOO'], LIBS=[])
test.write('main.cpp', r"""
#include "foo6.h"
-int main() { foo6(); return 0; }
+int main(void) { foo6(); return 0; }
""")
test.write(['qt', 'include', 'foo6.h'], """\
diff --git a/test/QT/manual.py b/test/QT/manual.py
index 1f140ae..c5cf74e 100644
--- a/test/QT/manual.py
+++ b/test/QT/manual.py
@@ -119,7 +119,7 @@ test.write('main.cpp', r"""
#include "eee.h"
#include "uic_fff.hpp"
-int main() {
+int main(void) {
aaa(); bbb(); ccc(); ddd(); eee(); fff(); return 0;
}
""")
diff --git a/test/QT/moc-from-header.py b/test/QT/moc-from-header.py
index 41b1b3d..4151cba 100644
--- a/test/QT/moc-from-header.py
+++ b/test/QT/moc-from-header.py
@@ -61,7 +61,7 @@ if env['PLATFORM'] == 'darwin':
test.write('aaa.cpp', r"""
#include "aaa.h"
-int main() { aaa(); return 0; }
+int main(void) { aaa(); return 0; }
""")
test.write('aaa.h', r"""
diff --git a/test/QT/reentrant.py b/test/QT/reentrant.py
index be464b9..af19af9 100644
--- a/test/QT/reentrant.py
+++ b/test/QT/reentrant.py
@@ -56,7 +56,7 @@ env.Program('main', 'main.cpp', CPPDEFINES=['FOO'], LIBS=[])
test.write('main.cpp', r"""
#include "foo5.h"
-int main() { foo5(); return 0; }
+int main(void) { foo5(); return 0; }
""")
test.run()
diff --git a/test/RPATH.py b/test/RPATH.py
index 4e13bb1..754abfe 100644
--- a/test/RPATH.py
+++ b/test/RPATH.py
@@ -46,7 +46,7 @@ Program('foo', 'foo.c', LIBS='bar', LIBPATH='bar', RPATH='bar')
test.write('foo.c', """\
#include <stdlib.h>
-int main() {
+int main(void) {
void bar();
bar();
exit (0);
diff --git a/test/YACC/live.py b/test/YACC/live.py
index 253a387..6dd08f7 100644
--- a/test/YACC/live.py
+++ b/test/YACC/live.py
@@ -60,7 +60,7 @@ extern int yyparse();
int yyerror(char *s);
int yylex();
-int main()
+int main(void)
{
return yyparse();
}
@@ -108,7 +108,7 @@ file_hpp = 'file.hpp'
test.write("hello.cpp", """\
#include "%(file_hpp)s"
-int main()
+int main(void)
{
}
""" % locals())