diff options
Diffstat (limited to 'test cases')
294 files changed, 396 insertions, 398 deletions
diff --git a/test cases/cmake/1 basic/main.cpp b/test cases/cmake/1 basic/main.cpp index 315c0f7..9507961 100644 --- a/test cases/cmake/1 basic/main.cpp +++ b/test cases/cmake/1 basic/main.cpp @@ -3,7 +3,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/10 header only/main.cpp b/test cases/cmake/10 header only/main.cpp index 315c0f7..9507961 100644 --- a/test cases/cmake/10 header only/main.cpp +++ b/test cases/cmake/10 header only/main.cpp @@ -3,7 +3,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/12 generator expressions/main.cpp b/test cases/cmake/12 generator expressions/main.cpp index 315c0f7..9507961 100644 --- a/test cases/cmake/12 generator expressions/main.cpp +++ b/test cases/cmake/12 generator expressions/main.cpp @@ -3,7 +3,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/13 system includes/main.cpp b/test cases/cmake/13 system includes/main.cpp index 315c0f7..9507961 100644 --- a/test cases/cmake/13 system includes/main.cpp +++ b/test cases/cmake/13 system includes/main.cpp @@ -3,7 +3,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/2 advanced/main.cpp b/test cases/cmake/2 advanced/main.cpp index 6cc4c0c..d823e29 100644 --- a/test cases/cmake/2 advanced/main.cpp +++ b/test cases/cmake/2 advanced/main.cpp @@ -8,7 +8,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/2 advanced/subprojects/cmMod/main.cpp b/test cases/cmake/2 advanced/subprojects/cmMod/main.cpp index a1b1637..77fab68 100644 --- a/test cases/cmake/2 advanced/subprojects/cmMod/main.cpp +++ b/test cases/cmake/2 advanced/subprojects/cmMod/main.cpp @@ -4,7 +4,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello (LIB TEST)"); cout << obj.getStr() << " ZLIB: " << zlibVersion() << endl; return 0; diff --git a/test cases/cmake/3 advanced no dep/main.cpp b/test cases/cmake/3 advanced no dep/main.cpp index 6cc4c0c..d823e29 100644 --- a/test cases/cmake/3 advanced no dep/main.cpp +++ b/test cases/cmake/3 advanced no dep/main.cpp @@ -8,7 +8,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/3 advanced no dep/subprojects/cmMod/main.cpp b/test cases/cmake/3 advanced no dep/subprojects/cmMod/main.cpp index cd21042..d3e67ca 100644 --- a/test cases/cmake/3 advanced no dep/subprojects/cmMod/main.cpp +++ b/test cases/cmake/3 advanced no dep/subprojects/cmMod/main.cpp @@ -3,7 +3,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello (LIB TEST)"); cout << obj.getStr() << endl; return 0; diff --git a/test cases/cmake/4 code gen/main.cpp b/test cases/cmake/4 code gen/main.cpp index 3ddbf63..a41204b 100644 --- a/test cases/cmake/4 code gen/main.cpp +++ b/test cases/cmake/4 code gen/main.cpp @@ -3,6 +3,6 @@ using namespace std; -int main() { +int main(void) { cout << getStr() << endl; } diff --git a/test cases/cmake/5 object library/main.cpp b/test cases/cmake/5 object library/main.cpp index f383608..918f332 100644 --- a/test cases/cmake/5 object library/main.cpp +++ b/test cases/cmake/5 object library/main.cpp @@ -4,6 +4,6 @@ using namespace std; -int main() { +int main(void) { cout << getLibStr() << " -- " << getZlibVers() << endl; } diff --git a/test cases/cmake/6 object library no dep/main.cpp b/test cases/cmake/6 object library no dep/main.cpp index f383608..918f332 100644 --- a/test cases/cmake/6 object library no dep/main.cpp +++ b/test cases/cmake/6 object library no dep/main.cpp @@ -4,6 +4,6 @@ using namespace std; -int main() { +int main(void) { cout << getLibStr() << " -- " << getZlibVers() << endl; } diff --git a/test cases/cmake/8 custom command/main.cpp b/test cases/cmake/8 custom command/main.cpp index fa6b0fa..7558d60 100644 --- a/test cases/cmake/8 custom command/main.cpp +++ b/test cases/cmake/8 custom command/main.cpp @@ -3,7 +3,7 @@ using namespace std; -int main() { +int main(void) { cmModClass obj("Hello"); cout << obj.getStr() << endl; cout << obj.getOther() << endl; diff --git a/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.c b/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.c index 068a5b8..e748ac7 100644 --- a/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.c +++ b/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.c @@ -1,5 +1,5 @@ #include "sub.h" -int sub() { +int sub(void) { return 0; } diff --git a/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.h b/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.h index f1ab0e1..2b59a3a 100644 --- a/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.h +++ b/test cases/common/102 subproject subdir/subprojects/sub/lib/sub.h @@ -1,6 +1,6 @@ #ifndef SUB_H #define SUB_H -int sub(); +int sub(void); #endif diff --git a/test cases/common/106 extract same name/lib.c b/test cases/common/106 extract same name/lib.c index 6bdeda7..f3d0417 100644 --- a/test cases/common/106 extract same name/lib.c +++ b/test cases/common/106 extract same name/lib.c @@ -1,3 +1,3 @@ -int func1() { +int func1(void) { return 23; } diff --git a/test cases/common/106 extract same name/main.c b/test cases/common/106 extract same name/main.c index e917d24..e5a0c1e 100644 --- a/test cases/common/106 extract same name/main.c +++ b/test cases/common/106 extract same name/main.c @@ -1,5 +1,5 @@ -int func1(); -int func2(); +int func1(void); +int func2(void); int main(void) { return !(func1() == 23 && func2() == 42); diff --git a/test cases/common/106 extract same name/src/lib.c b/test cases/common/106 extract same name/src/lib.c index 68e6ab9..a7d7e77 100644 --- a/test cases/common/106 extract same name/src/lib.c +++ b/test cases/common/106 extract same name/src/lib.c @@ -1,3 +1,3 @@ -int func2() { +int func2(void) { return 42; } diff --git a/test cases/common/114 allgenerate/foobar.cpp.in b/test cases/common/114 allgenerate/foobar.cpp.in index 7cec281..32e1261 100644 --- a/test cases/common/114 allgenerate/foobar.cpp.in +++ b/test cases/common/114 allgenerate/foobar.cpp.in @@ -1,6 +1,6 @@ #include<stdio.h> -int main() { +int main(void) { printf("I am a program.\n"); return 0; } diff --git a/test cases/common/116 subdir subproject/subprojects/sub/sub.c b/test cases/common/116 subdir subproject/subprojects/sub/sub.c index 068a5b8..e748ac7 100644 --- a/test cases/common/116 subdir subproject/subprojects/sub/sub.c +++ b/test cases/common/116 subdir subproject/subprojects/sub/sub.c @@ -1,5 +1,5 @@ #include "sub.h" -int sub() { +int sub(void) { return 0; } diff --git a/test cases/common/116 subdir subproject/subprojects/sub/sub.h b/test cases/common/116 subdir subproject/subprojects/sub/sub.h index f1ab0e1..2b59a3a 100644 --- a/test cases/common/116 subdir subproject/subprojects/sub/sub.h +++ b/test cases/common/116 subdir subproject/subprojects/sub/sub.h @@ -1,6 +1,6 @@ #ifndef SUB_H #define SUB_H -int sub(); +int sub(void); #endif diff --git a/test cases/common/119 subproject project arguments/exe.cpp b/test cases/common/119 subproject project arguments/exe.cpp index b739df7..9cfaec4 100644 --- a/test cases/common/119 subproject project arguments/exe.cpp +++ b/test cases/common/119 subproject project arguments/exe.cpp @@ -22,7 +22,7 @@ #error #endif -int main() { +int main(void) { return 0; } diff --git a/test cases/common/121 shared module/module.c b/test cases/common/121 shared module/module.c index 9c8774d..5dd26d7 100644 --- a/test cases/common/121 shared module/module.c +++ b/test cases/common/121 shared module/module.c @@ -51,7 +51,7 @@ fptr find_any_f (const char *name) { snapshot = CreateToolhelp32Snapshot (TH32CS_SNAPMODULE, 0); if (snapshot == (HANDLE) -1) { - wchar_t *msg = win32_get_last_error (); + wchar_t *msg = win32_get_last_error(); printf("Could not get snapshot: %S\n", msg); return 0; } @@ -71,7 +71,7 @@ fptr find_any_f (const char *name) { } #endif -int DLL_PUBLIC func() { +int DLL_PUBLIC func(void) { fptr f; f = find_any_f ("func_from_language_runtime"); @@ -88,7 +88,7 @@ int DLL_PUBLIC func() { * dlopens it. We need to make sure that this works, i.e. that we do * not pass -Wl,--no-undefined when linking modules. */ -int func_from_language_runtime(); +int func_from_language_runtime(void); int DLL_PUBLIC func(void) { return func_from_language_runtime(); diff --git a/test cases/common/122 llvm ir and assembly/main.cpp b/test cases/common/122 llvm ir and assembly/main.cpp index 07eaab8..aac3cbf 100644 --- a/test cases/common/122 llvm ir and assembly/main.cpp +++ b/test cases/common/122 llvm ir and assembly/main.cpp @@ -4,7 +4,7 @@ extern "C" { unsigned square_unsigned (unsigned a); } -int main () +int main (void) { unsigned int ret = square_unsigned (2); if (ret != 4) { diff --git a/test cases/common/123 cpp and asm/trivial.cc b/test cases/common/123 cpp and asm/trivial.cc index 7f2ead1..19d5e94 100644 --- a/test cases/common/123 cpp and asm/trivial.cc +++ b/test cases/common/123 cpp and asm/trivial.cc @@ -4,7 +4,7 @@ extern "C" { int get_retval(void); } -int main() { +int main(void) { std::cout << "C++ seems to be working." << std::endl; #if defined(USE_ASM) return get_retval(); diff --git a/test cases/common/124 extract all shared library/extractor.h b/test cases/common/124 extract all shared library/extractor.h index d0917a1..cfb7ff6 100644 --- a/test cases/common/124 extract all shared library/extractor.h +++ b/test cases/common/124 extract all shared library/extractor.h @@ -1,6 +1,6 @@ #pragma once -int func1(); -int func2(); -int func3(); -int func4(); +int func1(void); +int func2(void); +int func3(void); +int func4(void); diff --git a/test cases/common/124 extract all shared library/four.c b/test cases/common/124 extract all shared library/four.c index 5ca6696..f67a85e 100644 --- a/test cases/common/124 extract all shared library/four.c +++ b/test cases/common/124 extract all shared library/four.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func4() { +int func4(void) { return 4; } diff --git a/test cases/common/124 extract all shared library/one.c b/test cases/common/124 extract all shared library/one.c index cfb0157..152a145 100644 --- a/test cases/common/124 extract all shared library/one.c +++ b/test cases/common/124 extract all shared library/one.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func1() { +int func1(void) { return 1; } diff --git a/test cases/common/124 extract all shared library/three.c b/test cases/common/124 extract all shared library/three.c index c410046..24604ed 100644 --- a/test cases/common/124 extract all shared library/three.c +++ b/test cases/common/124 extract all shared library/three.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func3() { +int func3(void) { return 3; } diff --git a/test cases/common/124 extract all shared library/two.c b/test cases/common/124 extract all shared library/two.c index 3ece512..800cd2d 100644 --- a/test cases/common/124 extract all shared library/two.c +++ b/test cases/common/124 extract all shared library/two.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func2() { +int func2(void) { return 2; } diff --git a/test cases/common/125 object only target/prog.c b/test cases/common/125 object only target/prog.c index dc468ec..9841180 100644 --- a/test cases/common/125 object only target/prog.c +++ b/test cases/common/125 object only target/prog.c @@ -1,6 +1,6 @@ -int func1_in_obj(); -int func2_in_obj(); -int func3_in_obj(); +int func1_in_obj(void); +int func2_in_obj(void); +int func3_in_obj(void); int main(void) { return func1_in_obj() + func2_in_obj() + func3_in_obj(); diff --git a/test cases/common/125 object only target/source.c b/test cases/common/125 object only target/source.c index 7779b33..1dc08e1 100644 --- a/test cases/common/125 object only target/source.c +++ b/test cases/common/125 object only target/source.c @@ -1,3 +1,3 @@ -int func1_in_obj() { +int func1_in_obj(void) { return 0; } diff --git a/test cases/common/125 object only target/source2.c b/test cases/common/125 object only target/source2.c index 29aad40..8024b97 100644 --- a/test cases/common/125 object only target/source2.c +++ b/test cases/common/125 object only target/source2.c @@ -1,3 +1,3 @@ -int func2_in_obj() { +int func2_in_obj(void) { return 0; } diff --git a/test cases/common/125 object only target/source3.c b/test cases/common/125 object only target/source3.c index 1580f1e..c4362c4 100644 --- a/test cases/common/125 object only target/source3.c +++ b/test cases/common/125 object only target/source3.c @@ -1,3 +1,3 @@ -int func3_in_obj() { +int func3_in_obj(void) { return 0; } diff --git a/test cases/common/126 no buildincdir/include/header.h b/test cases/common/126 no buildincdir/include/header.h index add1850..1170ee3 100644 --- a/test cases/common/126 no buildincdir/include/header.h +++ b/test cases/common/126 no buildincdir/include/header.h @@ -1,3 +1,3 @@ #pragma once -int foobar(); +int foobar(void); diff --git a/test cases/common/13 pch/c/prog.c b/test cases/common/13 pch/c/prog.c index 12b790e..124bba0 100644 --- a/test cases/common/13 pch/c/prog.c +++ b/test cases/common/13 pch/c/prog.c @@ -1,6 +1,6 @@ // No includes here, they need to come from the PCH -void func() { +void func(void) { fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); } diff --git a/test cases/common/13 pch/cpp/prog.cc b/test cases/common/13 pch/cpp/prog.cc index 7fa6253..0ba8519 100644 --- a/test cases/common/13 pch/cpp/prog.cc +++ b/test cases/common/13 pch/cpp/prog.cc @@ -1,11 +1,11 @@ // Note: if using PGI compilers, you will need to add #include "prog.hh" // even though you're using precompiled headers. -void func() { +void func(void) { std::cout << "This is a function that fails to compile if iostream is not included." << std::endl; } -int main() { +int main(void) { func(); return 0; } diff --git a/test cases/common/13 pch/mixed/func.c b/test cases/common/13 pch/mixed/func.c index c02722e..620eca1 100644 --- a/test cases/common/13 pch/mixed/func.c +++ b/test cases/common/13 pch/mixed/func.c @@ -1,7 +1,7 @@ -void tmp_func() { +void tmp_func(void) { fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); } -int cfunc() { +int cfunc(void) { return 0; } diff --git a/test cases/common/13 pch/mixed/main.cc b/test cases/common/13 pch/mixed/main.cc index fb8932e..4321203 100644 --- a/test cases/common/13 pch/mixed/main.cc +++ b/test cases/common/13 pch/mixed/main.cc @@ -1,10 +1,10 @@ extern "C" int cfunc(); -void func() { +void func(void) { std::cout << "This is a function that fails to compile if iostream is not included." << std::endl; } -int main() { +int main(void) { return cfunc(); } diff --git a/test cases/common/13 pch/userDefined/pch/pch.c b/test cases/common/13 pch/userDefined/pch/pch.c index c107b1a..6a97140 100644 --- a/test cases/common/13 pch/userDefined/pch/pch.c +++ b/test cases/common/13 pch/userDefined/pch/pch.c @@ -1,5 +1,5 @@ #include "pch.h" -int foo() { +int foo(void) { return 0; } diff --git a/test cases/common/13 pch/withIncludeDirectories/prog.c b/test cases/common/13 pch/withIncludeDirectories/prog.c index 12b790e..124bba0 100644 --- a/test cases/common/13 pch/withIncludeDirectories/prog.c +++ b/test cases/common/13 pch/withIncludeDirectories/prog.c @@ -1,6 +1,6 @@ // No includes here, they need to come from the PCH -void func() { +void func(void) { fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); } diff --git a/test cases/common/135 override options/four.c b/test cases/common/135 override options/four.c index 7c85448..44e344f 100644 --- a/test cases/common/135 override options/four.c +++ b/test cases/common/135 override options/four.c @@ -1,6 +1,6 @@ -int func(); +int func(void); -static int duplicate_func() { +static int duplicate_func(void) { return -4; } diff --git a/test cases/common/135 override options/one.c b/test cases/common/135 override options/one.c index 14fe9d6..6120d48 100644 --- a/test cases/common/135 override options/one.c +++ b/test cases/common/135 override options/one.c @@ -1,3 +1,3 @@ -static int hidden_func() { +static int hidden_func(void) { return 0; } diff --git a/test cases/common/135 override options/three.c b/test cases/common/135 override options/three.c index 305a575..094260e 100644 --- a/test cases/common/135 override options/three.c +++ b/test cases/common/135 override options/three.c @@ -1,7 +1,7 @@ -static int duplicate_func() { +static int duplicate_func(void) { return 4; } -int func() { +int func(void) { return duplicate_func(); } diff --git a/test cases/common/137 c cpp and asm/main.cpp b/test cases/common/137 c cpp and asm/main.cpp index 2abd084..debb97a 100644 --- a/test cases/common/137 c cpp and asm/main.cpp +++ b/test cases/common/137 c cpp and asm/main.cpp @@ -5,7 +5,7 @@ extern "C" { int get_cval(void); } -int main() { +int main(void) { std::cout << "C++ seems to be working." << std::endl; return get_retval(); } diff --git a/test cases/common/138 compute int/prog.c.in b/test cases/common/138 compute int/prog.c.in index e78a98c..0983aff 100644 --- a/test cases/common/138 compute int/prog.c.in +++ b/test cases/common/138 compute int/prog.c.in @@ -4,7 +4,7 @@ #include <limits.h> #include "foobar.h" -int main() { +int main(void) { if(INTSIZE != sizeof(int)) { fprintf(stderr, "Mismatch: computed int size %d, actual size %d.\n", INTSIZE, (int)sizeof(int)); return 1; diff --git a/test cases/common/139 custom target object output/objdir/source.c b/test cases/common/139 custom target object output/objdir/source.c index 7779b33..1dc08e1 100644 --- a/test cases/common/139 custom target object output/objdir/source.c +++ b/test cases/common/139 custom target object output/objdir/source.c @@ -1,3 +1,3 @@ -int func1_in_obj() { +int func1_in_obj(void) { return 0; } diff --git a/test cases/common/139 custom target object output/progdir/prog.c b/test cases/common/139 custom target object output/progdir/prog.c index 9c82659..bc3caf3 100644 --- a/test cases/common/139 custom target object output/progdir/prog.c +++ b/test cases/common/139 custom target object output/progdir/prog.c @@ -1,4 +1,4 @@ -int func1_in_obj(); +int func1_in_obj(void); int main(void) { return func1_in_obj(); diff --git a/test cases/common/141 whole archive/func1.c b/test cases/common/141 whole archive/func1.c index b2690a0..161c5da 100644 --- a/test cases/common/141 whole archive/func1.c +++ b/test cases/common/141 whole archive/func1.c @@ -2,6 +2,6 @@ #include<mylib.h> -int func1() { +int func1(void) { return 42; } diff --git a/test cases/common/141 whole archive/func2.c b/test cases/common/141 whole archive/func2.c index 9e287a4..4fe7150 100644 --- a/test cases/common/141 whole archive/func2.c +++ b/test cases/common/141 whole archive/func2.c @@ -2,6 +2,6 @@ #include<mylib.h> -int func2() { +int func2(void) { return 42; } diff --git a/test cases/common/141 whole archive/mylib.h b/test cases/common/141 whole archive/mylib.h index 813cc67..79ce585 100644 --- a/test cases/common/141 whole archive/mylib.h +++ b/test cases/common/141 whole archive/mylib.h @@ -17,5 +17,5 @@ #endif #endif -int DLL_PUBLIC func1(); -int DLL_PUBLIC func2(); +int DLL_PUBLIC func1(void); +int DLL_PUBLIC func2(void); diff --git a/test cases/common/149 recursive linking/3rdorderdeps/main.c.in b/test cases/common/149 recursive linking/3rdorderdeps/main.c.in index f5bc0b4..643c246 100644 --- a/test cases/common/149 recursive linking/3rdorderdeps/main.c.in +++ b/test cases/common/149 recursive linking/3rdorderdeps/main.c.in @@ -4,7 +4,7 @@ SYMBOL_IMPORT int get_@LIBTYPE@@DEPENDENCY@dep_value (void); -int main() { +int main(void) { int val; val = get_@LIBTYPE@@DEPENDENCY@dep_value (); diff --git a/test cases/common/151 simd/simd_avx.c b/test cases/common/151 simd/simd_avx.c index 1c84dae..5f45a4e 100644 --- a/test cases/common/151 simd/simd_avx.c +++ b/test cases/common/151 simd/simd_avx.c @@ -10,7 +10,7 @@ #ifdef _MSC_VER #include<intrin.h> -int avx_available() { +int avx_available(void) { return 1; } #else @@ -23,10 +23,10 @@ int avx_available() { * some machines in the CI farm seem to be too * old to have AVX so just always return 0 here. */ -int avx_available() { return 0; } +int avx_available(void) { return 0; } #else -int avx_available() { +int avx_available(void) { return __builtin_cpu_supports("avx"); } #endif diff --git a/test cases/common/151 simd/simd_avx2.c b/test cases/common/151 simd/simd_avx2.c index 15297eb..c79819b 100644 --- a/test cases/common/151 simd/simd_avx2.c +++ b/test cases/common/151 simd/simd_avx2.c @@ -8,7 +8,7 @@ #ifdef _MSC_VER #include<intrin.h> -int avx2_available() { +int avx2_available(void) { return 0; } #else @@ -16,9 +16,9 @@ int avx2_available() { #include<cpuid.h> #if defined(__APPLE__) -int avx2_available() { return 0; } +int avx2_available(void) { return 0; } #else -int avx2_available() { +int avx2_available(void) { return __builtin_cpu_supports("avx2"); } #endif diff --git a/test cases/common/151 simd/simd_mmx.c b/test cases/common/151 simd/simd_mmx.c index 528ed3c..7605442 100644 --- a/test cases/common/151 simd/simd_mmx.c +++ b/test cases/common/151 simd/simd_mmx.c @@ -5,7 +5,7 @@ #ifdef _MSC_VER #include<intrin.h> -int mmx_available() { +int mmx_available(void) { return 1; } /* Contrary to MSDN documentation, MMX intrinsics @@ -18,7 +18,7 @@ void increment_mmx(float arr[4]) { arr[3]++; } #elif defined(__MINGW32__) -int mmx_available() { +int mmx_available(void) { return 1; } /* MinGW does not seem to ship with MMX or it is broken. @@ -34,9 +34,9 @@ void increment_mmx(float arr[4]) { #include<cpuid.h> #if defined(__APPLE__) -int mmx_available() { return 1; } +int mmx_available(void) { return 1; } #else -int mmx_available() { +int mmx_available(void) { return __builtin_cpu_supports("mmx"); } #endif diff --git a/test cases/common/151 simd/simd_neon.c b/test cases/common/151 simd/simd_neon.c index 2082099..2834b30 100644 --- a/test cases/common/151 simd/simd_neon.c +++ b/test cases/common/151 simd/simd_neon.c @@ -4,7 +4,7 @@ #include<arm_neon.h> #include<stdint.h> -int neon_available() { +int neon_available(void) { return 1; /* Incorrect, but I don't know how to check this properly. */ } diff --git a/test cases/common/151 simd/simd_sse.c b/test cases/common/151 simd/simd_sse.c index 3c9fe62..6014e0c 100644 --- a/test cases/common/151 simd/simd_sse.c +++ b/test cases/common/151 simd/simd_sse.c @@ -3,7 +3,7 @@ #ifdef _MSC_VER #include<intrin.h> -int sse_available() { +int sse_available(void) { return 1; } #else @@ -13,9 +13,9 @@ int sse_available() { #include<stdint.h> #if defined(__APPLE__) -int sse_available() { return 1; } +int sse_available(void) { return 1; } #else -int sse_available() { +int sse_available(void) { return __builtin_cpu_supports("sse"); } #endif diff --git a/test cases/common/151 simd/simd_sse2.c b/test cases/common/151 simd/simd_sse2.c index 271022e..445afb6 100644 --- a/test cases/common/151 simd/simd_sse2.c +++ b/test cases/common/151 simd/simd_sse2.c @@ -3,7 +3,7 @@ #include<emmintrin.h> #ifdef _MSC_VER -int sse2_available() { +int sse2_available(void) { return 1; } @@ -12,9 +12,9 @@ int sse2_available() { #include<stdint.h> #if defined(__APPLE__) -int sse2_available() { return 1; } +int sse2_available(void) { return 1; } #else -int sse2_available() { +int sse2_available(void) { return __builtin_cpu_supports("sse2"); } #endif diff --git a/test cases/common/151 simd/simd_sse3.c b/test cases/common/151 simd/simd_sse3.c index 89c2f8b..29a35e6 100644 --- a/test cases/common/151 simd/simd_sse3.c +++ b/test cases/common/151 simd/simd_sse3.c @@ -3,7 +3,7 @@ #ifdef _MSC_VER #include<intrin.h> -int sse3_available() { +int sse3_available(void) { return 1; } #else @@ -13,9 +13,9 @@ int sse3_available() { #include<stdint.h> #if defined(__APPLE__) -int sse3_available() { return 1; } +int sse3_available(void) { return 1; } #else -int sse3_available() { +int sse3_available(void) { return __builtin_cpu_supports("sse3"); } #endif diff --git a/test cases/common/151 simd/simd_sse41.c b/test cases/common/151 simd/simd_sse41.c index 859fb43..29f2555 100644 --- a/test cases/common/151 simd/simd_sse41.c +++ b/test cases/common/151 simd/simd_sse41.c @@ -6,7 +6,7 @@ #ifdef _MSC_VER #include<intrin.h> -int sse41_available() { +int sse41_available(void) { return 1; } @@ -15,9 +15,9 @@ int sse41_available() { #include<cpuid.h> #if defined(__APPLE__) -int sse41_available() { return 1; } +int sse41_available(void) { return 1; } #else -int sse41_available() { +int sse41_available(void) { return __builtin_cpu_supports("sse4.1"); } #endif diff --git a/test cases/common/151 simd/simd_sse42.c b/test cases/common/151 simd/simd_sse42.c index edd6e5b..f1564e2 100644 --- a/test cases/common/151 simd/simd_sse42.c +++ b/test cases/common/151 simd/simd_sse42.c @@ -5,7 +5,7 @@ #ifdef _MSC_VER #include<intrin.h> -int sse42_available() { +int sse42_available(void) { return 1; } @@ -15,11 +15,11 @@ int sse42_available() { #include<cpuid.h> #ifdef __APPLE__ -int sse42_available() { +int sse42_available(void) { return 1; } #else -int sse42_available() { +int sse42_available(void) { return __builtin_cpu_supports("sse4.2"); } #endif diff --git a/test cases/common/151 simd/simd_ssse3.c b/test cases/common/151 simd/simd_ssse3.c index 0156f77..fa557f4 100644 --- a/test cases/common/151 simd/simd_ssse3.c +++ b/test cases/common/151 simd/simd_ssse3.c @@ -7,7 +7,7 @@ #ifdef _MSC_VER #include<intrin.h> -int ssse3_available() { +int ssse3_available(void) { return 1; } @@ -16,7 +16,7 @@ int ssse3_available() { #include<cpuid.h> #include<stdint.h> -int ssse3_available() { +int ssse3_available(void) { #ifdef __APPLE__ return 1; #elif defined(__clang__) diff --git a/test cases/common/151 simd/simdfuncs.h b/test cases/common/151 simd/simdfuncs.h index c5e1658..d820f25 100644 --- a/test cases/common/151 simd/simdfuncs.h +++ b/test cases/common/151 simd/simdfuncs.h @@ -18,57 +18,57 @@ void increment_fallback(float arr[4]); #if HAVE_MMX -int mmx_available(); +int mmx_available(void); void increment_mmx(float arr[4]); #endif #if HAVE_SSE -int sse_available(); +int sse_available(void); void increment_sse(float arr[4]); #endif #if HAVE_SSE2 -int sse2_available(); +int sse2_available(void); void increment_sse2(float arr[4]); #endif #if HAVE_SSE3 -int sse3_available(); +int sse3_available(void); void increment_sse3(float arr[4]); #endif #if HAVE_SSSE3 -int ssse3_available(); +int ssse3_available(void); void increment_ssse3(float arr[4]); #endif #if HAVE_SSE41 -int sse41_available(); +int sse41_available(void); void increment_sse41(float arr[4]); #endif #if HAVE_SSE42 -int sse42_available(); +int sse42_available(void); void increment_sse42(float arr[4]); #endif #if HAVE_AVX -int avx_available(); +int avx_available(void); void increment_avx(float arr[4]); #endif #if HAVE_AVX2 -int avx2_available(); +int avx2_available(void); void increment_avx2(float arr[4]); #endif #if HAVE_NEON -int neon_available(); +int neon_available(void); void increment_neon(float arr[4]); #endif #if HAVE_ALTIVEC -int altivec_available(); +int altivec_available(void); void increment_altivec(float arr[4]); #endif diff --git a/test cases/common/157 wrap file should not failed/subprojects/foo-1.0/foo.c b/test cases/common/157 wrap file should not failed/subprojects/foo-1.0/foo.c index 019f2ba..267b43a 100644 --- a/test cases/common/157 wrap file should not failed/subprojects/foo-1.0/foo.c +++ b/test cases/common/157 wrap file should not failed/subprojects/foo-1.0/foo.c @@ -1,3 +1,3 @@ -int dummy_func() { +int dummy_func(void) { return 42; } diff --git a/test cases/common/157 wrap file should not failed/subprojects/zlib-1.2.8/foo.c b/test cases/common/157 wrap file should not failed/subprojects/zlib-1.2.8/foo.c index 019f2ba..267b43a 100644 --- a/test cases/common/157 wrap file should not failed/subprojects/zlib-1.2.8/foo.c +++ b/test cases/common/157 wrap file should not failed/subprojects/zlib-1.2.8/foo.c @@ -1,3 +1,3 @@ -int dummy_func() { +int dummy_func(void) { return 42; } diff --git a/test cases/common/159 subproject dir name collision/a.c b/test cases/common/159 subproject dir name collision/a.c index 5b1208d..7510a1b 100644 --- a/test cases/common/159 subproject dir name collision/a.c +++ b/test cases/common/159 subproject dir name collision/a.c @@ -1,6 +1,6 @@ #include<assert.h> -char func_b(); -char func_c(); +char func_b(void); +char func_c(void); int main(void) { if(func_b() != 'b') { diff --git a/test cases/common/159 subproject dir name collision/custom_subproject_dir/B/b.c b/test cases/common/159 subproject dir name collision/custom_subproject_dir/B/b.c index 4c94ee9..4d71c0f 100644 --- a/test cases/common/159 subproject dir name collision/custom_subproject_dir/B/b.c +++ b/test cases/common/159 subproject dir name collision/custom_subproject_dir/B/b.c @@ -1,5 +1,5 @@ #include<stdlib.h> -char func_c(); +char func_c(void); #if defined _WIN32 || defined __CYGWIN__ #define DLL_PUBLIC __declspec(dllexport) @@ -12,7 +12,7 @@ char func_c(); #endif #endif -char DLL_PUBLIC func_b() { +char DLL_PUBLIC func_b(void) { if(func_c() != 'c') { exit(3); } diff --git a/test cases/common/159 subproject dir name collision/custom_subproject_dir/C/c.c b/test cases/common/159 subproject dir name collision/custom_subproject_dir/C/c.c index eebfb9f..facd199 100644 --- a/test cases/common/159 subproject dir name collision/custom_subproject_dir/C/c.c +++ b/test cases/common/159 subproject dir name collision/custom_subproject_dir/C/c.c @@ -9,6 +9,6 @@ #endif #endif -char DLL_PUBLIC func_c() { +char DLL_PUBLIC func_c(void) { return 'c'; } diff --git a/test cases/common/159 subproject dir name collision/other_subdir/custom_subproject_dir/other.c b/test cases/common/159 subproject dir name collision/other_subdir/custom_subproject_dir/other.c index 0c27f84..fa1953e 100644 --- a/test cases/common/159 subproject dir name collision/other_subdir/custom_subproject_dir/other.c +++ b/test cases/common/159 subproject dir name collision/other_subdir/custom_subproject_dir/other.c @@ -11,7 +11,7 @@ #endif #endif -char DLL_PUBLIC func_b() { +char DLL_PUBLIC func_b(void) { if('c' != 'c') { exit(3); } diff --git a/test cases/common/161 custom target subdir depend files/subdir/foo.c.in b/test cases/common/161 custom target subdir depend files/subdir/foo.c.in index d53846f..a867b32 100644 --- a/test cases/common/161 custom target subdir depend files/subdir/foo.c.in +++ b/test cases/common/161 custom target subdir depend files/subdir/foo.c.in @@ -1,6 +1,6 @@ #include <stdio.h> -int main() { +int main(void) { printf("foo is working.\n"); return 0; } diff --git a/test cases/common/165 custom target template substitution/foo.c.in b/test cases/common/165 custom target template substitution/foo.c.in index d53846f..a867b32 100644 --- a/test cases/common/165 custom target template substitution/foo.c.in +++ b/test cases/common/165 custom target template substitution/foo.c.in @@ -1,6 +1,6 @@ #include <stdio.h> -int main() { +int main(void) { printf("foo is working.\n"); return 0; } diff --git a/test cases/common/166 not-found dependency/subprojects/trivial/trivial.c b/test cases/common/166 not-found dependency/subprojects/trivial/trivial.c index 35b21e0..cb0c02f 100644 --- a/test cases/common/166 not-found dependency/subprojects/trivial/trivial.c +++ b/test cases/common/166 not-found dependency/subprojects/trivial/trivial.c @@ -1,3 +1,3 @@ -int subfunc() { +int subfunc(void) { return 42; } diff --git a/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/alpha/a.c b/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/alpha/a.c index 7ac3e5e..f9848c1 100644 --- a/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/alpha/a.c +++ b/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/alpha/a.c @@ -1,4 +1,4 @@ -int func2(); +int func2(void); #if defined _WIN32 || defined __CYGWIN__ #define DLL_PUBLIC __declspec(dllexport) @@ -11,5 +11,5 @@ int func2(); #endif #endif -int DLL_PUBLIC func() { return func2(); } +int DLL_PUBLIC func(void) { return func2(); } diff --git a/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/beta/b.c b/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/beta/b.c index a95651b..8c07177 100644 --- a/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/beta/b.c +++ b/test cases/common/172 subproject nested subproject dirs/contrib/subprojects/beta/b.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC func2() { +int DLL_PUBLIC func2(void) { return 42; } diff --git a/test cases/common/172 subproject nested subproject dirs/prog.c b/test cases/common/172 subproject nested subproject dirs/prog.c index 5536c36..27162c5 100644 --- a/test cases/common/172 subproject nested subproject dirs/prog.c +++ b/test cases/common/172 subproject nested subproject dirs/prog.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func() == 42 ? 0 : 1; diff --git a/test cases/common/173 preserve gendir/genprog.py b/test cases/common/173 preserve gendir/genprog.py index 1e10998..a50642b 100755 --- a/test cases/common/173 preserve gendir/genprog.py +++ b/test cases/common/173 preserve gendir/genprog.py @@ -4,12 +4,12 @@ import os, sys, argparse h_templ = '''#pragma once -int %s(); +int %s(void); ''' c_templ = '''#include"%s.h" -int %s() { +int %s(void) { return 0; } ''' diff --git a/test cases/common/174 source in dep/bar.cpp b/test cases/common/174 source in dep/bar.cpp index bda8cb6..2ea623b 100644 --- a/test cases/common/174 source in dep/bar.cpp +++ b/test cases/common/174 source in dep/bar.cpp @@ -1,5 +1,5 @@ -extern "C" int foo(); +extern "C" int foo(void); -int main(int, char**) { +int main(void) { return foo() != 42; } diff --git a/test cases/common/174 source in dep/foo.c b/test cases/common/174 source in dep/foo.c index 1ecfa8c..c1be8d0 100644 --- a/test cases/common/174 source in dep/foo.c +++ b/test cases/common/174 source in dep/foo.c @@ -1,3 +1,3 @@ -int foo() { +int foo(void) { return 42; } diff --git a/test cases/common/174 source in dep/generated/genheader.py b/test cases/common/174 source in dep/generated/genheader.py index eafc075..489db23 100755 --- a/test cases/common/174 source in dep/generated/genheader.py +++ b/test cases/common/174 source in dep/generated/genheader.py @@ -7,7 +7,7 @@ ofile = sys.argv[2] templ = '''#pragma once -int %s() { +int %s(void) { return 42; } ''' diff --git a/test cases/common/175 generator link whole/generator.py b/test cases/common/175 generator link whole/generator.py index 0076b74..18a6cc2 100755 --- a/test cases/common/175 generator link whole/generator.py +++ b/test cases/common/175 generator link whole/generator.py @@ -15,12 +15,12 @@ def main(): hfile.write(''' #pragma once #include "export.h" -int DLL_PUBLIC {name}(); +int DLL_PUBLIC {name}(void); '''.format(name=name)) with open(cname, 'w') as cfile: cfile.write(''' #include "{name}.h" -int {name}() {{ +int {name}(void) {{ return {size}; }} '''.format(name=name, size=len(name))) diff --git a/test cases/common/175 generator link whole/pull_meson_test_function.c b/test cases/common/175 generator link whole/pull_meson_test_function.c index c54dda6..23d24ac 100644 --- a/test cases/common/175 generator link whole/pull_meson_test_function.c +++ b/test cases/common/175 generator link whole/pull_meson_test_function.c @@ -1,6 +1,6 @@ #include "export.h" #include "meson_test_function.h" -int DLL_PUBLIC function_puller() { +int DLL_PUBLIC function_puller(void) { return meson_test_function(); } diff --git a/test cases/common/178 as-needed/main.cpp b/test cases/common/178 as-needed/main.cpp index 191d15c..a893431 100644 --- a/test cases/common/178 as-needed/main.cpp +++ b/test cases/common/178 as-needed/main.cpp @@ -2,6 +2,6 @@ #include "libA.h" -int main() { +int main(void) { return !meson_test_as_needed::linked ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/test cases/common/18 array/func.c b/test cases/common/18 array/func.c index 7412372..a324dca 100644 --- a/test cases/common/18 array/func.c +++ b/test cases/common/18 array/func.c @@ -1 +1 @@ -int func() { return 0; } +int func(void) { return 0; } diff --git a/test cases/common/18 array/prog.c b/test cases/common/18 array/prog.c index 51204b9..f794e1b 100644 --- a/test cases/common/18 array/prog.c +++ b/test cases/common/18 array/prog.c @@ -1,3 +1,3 @@ -extern int func(); +extern int func(void); int main(void) { return func(); } diff --git a/test cases/common/183 bothlibraries/libfile.c b/test cases/common/183 bothlibraries/libfile.c index 085ef3b..f5e228e 100644 --- a/test cases/common/183 bothlibraries/libfile.c +++ b/test cases/common/183 bothlibraries/libfile.c @@ -2,6 +2,6 @@ DO_EXPORT int retval = 42; -DO_EXPORT int func() { +DO_EXPORT int func(void) { return retval; } diff --git a/test cases/common/183 bothlibraries/main.c b/test cases/common/183 bothlibraries/main.c index 9b6e39d..8237bae 100644 --- a/test cases/common/183 bothlibraries/main.c +++ b/test cases/common/183 bothlibraries/main.c @@ -1,6 +1,6 @@ #include "mylib.h" -DO_IMPORT int func(); +DO_IMPORT int func(void); DO_IMPORT int retval; int main(void) { diff --git a/test cases/common/184 escape and unicode/file.c.in b/test cases/common/184 escape and unicode/file.c.in index 413ed42..5dd6e50 100644 --- a/test cases/common/184 escape and unicode/file.c.in +++ b/test cases/common/184 escape and unicode/file.c.in @@ -1,5 +1,5 @@ #include<stdio.h> -const char* does_it_work() { +const char* does_it_work(void) { printf("{NAME}\n"); return "yes it does"; } diff --git a/test cases/common/184 escape and unicode/fun.c b/test cases/common/184 escape and unicode/fun.c index 8eeb8ea..c5634d8 100644 --- a/test cases/common/184 escape and unicode/fun.c +++ b/test cases/common/184 escape and unicode/fun.c @@ -1,3 +1,3 @@ -int a_fun() { +int a_fun(void) { return 1; } diff --git a/test cases/common/184 escape and unicode/main.c b/test cases/common/184 escape and unicode/main.c index 3435125..6137ad7 100644 --- a/test cases/common/184 escape and unicode/main.c +++ b/test cases/common/184 escape and unicode/main.c @@ -1,8 +1,8 @@ #include <string.h> -const char* does_it_work(); +const char* does_it_work(void); -int a_fun(); +int a_fun(void); int main(void) { if(strcmp(does_it_work(), "yes it does") != 0) { diff --git a/test cases/common/187 find override/otherdir/main.c b/test cases/common/187 find override/otherdir/main.c index b3c39c9..5fb6371 100644 --- a/test cases/common/187 find override/otherdir/main.c +++ b/test cases/common/187 find override/otherdir/main.c @@ -1,4 +1,4 @@ -int be_seeing_you(); +int be_seeing_you(void); int main(void) { return be_seeing_you() == 6 ? 0 : 1; diff --git a/test cases/common/187 find override/otherdir/main2.c b/test cases/common/187 find override/otherdir/main2.c index 522fcbd..80a3009 100644 --- a/test cases/common/187 find override/otherdir/main2.c +++ b/test cases/common/187 find override/otherdir/main2.c @@ -1,4 +1,4 @@ -int number_returner(); +int number_returner(void); int main(void) { return number_returner() == 100 ? 0 : 1; diff --git a/test cases/common/187 find override/subdir/converter.py b/test cases/common/187 find override/subdir/converter.py index ee2ff85..efe0464 100755 --- a/test cases/common/187 find override/subdir/converter.py +++ b/test cases/common/187 find override/subdir/converter.py @@ -5,7 +5,7 @@ import pathlib [ifilename, ofilename] = sys.argv[1:3] -ftempl = '''int %s() { +ftempl = '''int %s(void) { return 6; } ''' diff --git a/test cases/common/187 find override/subdir/gencodegen.py.in b/test cases/common/187 find override/subdir/gencodegen.py.in index 57d9c40..78ebb2f 100755 --- a/test cases/common/187 find override/subdir/gencodegen.py.in +++ b/test cases/common/187 find override/subdir/gencodegen.py.in @@ -5,7 +5,7 @@ import pathlib [ifilename, ofilename] = sys.argv[1:3] -ftempl = '''int %s() { +ftempl = '''int %s(void) { return @NUMBER@; } ''' diff --git a/test cases/common/19 includedir/include/func.h b/test cases/common/19 includedir/include/func.h index 29ebd0b..647b72f 100644 --- a/test cases/common/19 includedir/include/func.h +++ b/test cases/common/19 includedir/include/func.h @@ -1,6 +1,6 @@ #ifndef FUNC_H__ #define FUNC_H__ -int func(); +int func(void); #endif diff --git a/test cases/common/19 includedir/src/func.c b/test cases/common/19 includedir/src/func.c index 193edbb..215beff 100644 --- a/test cases/common/19 includedir/src/func.c +++ b/test cases/common/19 includedir/src/func.c @@ -1,5 +1,5 @@ #include "func.h" -int func() { +int func(void) { return 0; } diff --git a/test cases/common/190 same target name/file.c b/test cases/common/190 same target name/file.c index 6f1c172..9180030 100644 --- a/test cases/common/190 same target name/file.c +++ b/test cases/common/190 same target name/file.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 0; } diff --git a/test cases/common/190 same target name/sub/file2.c b/test cases/common/190 same target name/sub/file2.c index a5e453d..3d1a1c3 100644 --- a/test cases/common/190 same target name/sub/file2.c +++ b/test cases/common/190 same target name/sub/file2.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 5; } diff --git a/test cases/common/195 install_mode/stat.c b/test cases/common/195 install_mode/stat.c index fa76a65..4825cef 100644 --- a/test cases/common/195 install_mode/stat.c +++ b/test cases/common/195 install_mode/stat.c @@ -1 +1 @@ -int func() { return 933; } +int func(void) { return 933; } diff --git a/test cases/common/2 cpp/trivial.cc b/test cases/common/2 cpp/trivial.cc index c5ade72..d3df476 100644 --- a/test cases/common/2 cpp/trivial.cc +++ b/test cases/common/2 cpp/trivial.cc @@ -1,6 +1,6 @@ #include<iostream> -int main() { +int main(void) { std::cout << "C++ seems to be working." << std::endl; return 0; } diff --git a/test cases/common/200 generator in subdir/com/mesonbuild/genprog.py b/test cases/common/200 generator in subdir/com/mesonbuild/genprog.py index 1e10998..a50642b 100644 --- a/test cases/common/200 generator in subdir/com/mesonbuild/genprog.py +++ b/test cases/common/200 generator in subdir/com/mesonbuild/genprog.py @@ -4,12 +4,12 @@ import os, sys, argparse h_templ = '''#pragma once -int %s(); +int %s(void); ''' c_templ = '''#include"%s.h" -int %s() { +int %s(void) { return 0; } ''' diff --git a/test cases/common/202 subproject with features/subprojects/disabled_sub/lib/sub.c b/test cases/common/202 subproject with features/subprojects/disabled_sub/lib/sub.c index 068a5b8..e748ac7 100644 --- a/test cases/common/202 subproject with features/subprojects/disabled_sub/lib/sub.c +++ b/test cases/common/202 subproject with features/subprojects/disabled_sub/lib/sub.c @@ -1,5 +1,5 @@ #include "sub.h" -int sub() { +int sub(void) { return 0; } diff --git a/test cases/common/202 subproject with features/subprojects/sub/lib/sub.c b/test cases/common/202 subproject with features/subprojects/sub/lib/sub.c index ed78306..768ed36 100644 --- a/test cases/common/202 subproject with features/subprojects/sub/lib/sub.c +++ b/test cases/common/202 subproject with features/subprojects/sub/lib/sub.c @@ -1,5 +1,5 @@ #include "sub.h" -int sub() { +int sub(void) { return 0; } diff --git a/test cases/common/202 subproject with features/subprojects/sub/lib/sub.h b/test cases/common/202 subproject with features/subprojects/sub/lib/sub.h index f1ab0e1..2b59a3a 100644 --- a/test cases/common/202 subproject with features/subprojects/sub/lib/sub.h +++ b/test cases/common/202 subproject with features/subprojects/sub/lib/sub.h @@ -1,6 +1,6 @@ #ifndef SUB_H #define SUB_H -int sub(); +int sub(void); #endif diff --git a/test cases/common/206 install name_prefix name_suffix/libfile.c b/test cases/common/206 install name_prefix name_suffix/libfile.c index 44f7667..91489b2 100644 --- a/test cases/common/206 install name_prefix name_suffix/libfile.c +++ b/test cases/common/206 install name_prefix name_suffix/libfile.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC func() { +int DLL_PUBLIC func(void) { return 0; } diff --git a/test cases/common/21 global arg/prog.c b/test cases/common/21 global arg/prog.c index 9c4660b..2a71236 100644 --- a/test cases/common/21 global arg/prog.c +++ b/test cases/common/21 global arg/prog.c @@ -38,6 +38,6 @@ #endif #endif -int main() { +int main(void) { return 0; } diff --git a/test cases/common/21 global arg/prog.cc b/test cases/common/21 global arg/prog.cc index 9a18362..5c32209 100644 --- a/test cases/common/21 global arg/prog.cc +++ b/test cases/common/21 global arg/prog.cc @@ -10,6 +10,6 @@ #error "Global argument not set" #endif -int main() { +int main(void) { return 0; } diff --git a/test cases/common/212 native file path override/main.cpp b/test cases/common/212 native file path override/main.cpp index d65cab2..91bc809 100644 --- a/test cases/common/212 native file path override/main.cpp +++ b/test cases/common/212 native file path override/main.cpp @@ -1,5 +1,5 @@ #include <iostream> -int main() { +int main(void) { std::cout << "Hello world!" << std::endl; } diff --git a/test cases/common/215 link custom/custom_stlib.py b/test cases/common/215 link custom/custom_stlib.py index 80334ed..2e61ac9 100755 --- a/test cases/common/215 link custom/custom_stlib.py +++ b/test cases/common/215 link custom/custom_stlib.py @@ -10,7 +10,7 @@ parser.add_argument('cmparr', nargs='+') contents = '''#include<stdio.h> -void flob() { +void flob(void) { printf("Now flobbing.\\n"); } ''' diff --git a/test cases/common/215 link custom/prog.c b/test cases/common/215 link custom/prog.c index 2273b1d..efecbef 100644 --- a/test cases/common/215 link custom/prog.c +++ b/test cases/common/215 link custom/prog.c @@ -1,4 +1,4 @@ -void flob(); +void flob(void); int main(void) { flob(); diff --git a/test cases/common/216 link custom_i single from multiple/prog.c b/test cases/common/216 link custom_i single from multiple/prog.c index 46d10c7..040672a 100644 --- a/test cases/common/216 link custom_i single from multiple/prog.c +++ b/test cases/common/216 link custom_i single from multiple/prog.c @@ -1,4 +1,4 @@ -int flob(); +int flob(void); int main(void) { return (flob() == 1 ? 0 : 1); diff --git a/test cases/common/217 link custom_i multiple from multiple/prog.c b/test cases/common/217 link custom_i multiple from multiple/prog.c index 2d626ef..7b0c5cf 100644 --- a/test cases/common/217 link custom_i multiple from multiple/prog.c +++ b/test cases/common/217 link custom_i multiple from multiple/prog.c @@ -1,5 +1,5 @@ -void flob_1(); -void flob_2(); +void flob_1(void); +void flob_2(void); int main(void) { flob_1(); diff --git a/test cases/common/22 target arg/func.c b/test cases/common/22 target arg/func.c index 9b3fe5d..8c0659e 100644 --- a/test cases/common/22 target arg/func.c +++ b/test cases/common/22 target arg/func.c @@ -6,4 +6,4 @@ #error "Wrong local argument set" #endif -int func() { return 0; } +int func(void) { return 0; } diff --git a/test cases/common/22 target arg/func2.c b/test cases/common/22 target arg/func2.c index d3e91a5..1897cf7 100644 --- a/test cases/common/22 target arg/func2.c +++ b/test cases/common/22 target arg/func2.c @@ -6,4 +6,4 @@ #error "Local CPP argument set in wrong target" #endif -int func() { return 0; } +int func(void) { return 0; } diff --git a/test cases/common/22 target arg/prog.cc b/test cases/common/22 target arg/prog.cc index 4a3aa1f..23028af 100644 --- a/test cases/common/22 target arg/prog.cc +++ b/test cases/common/22 target arg/prog.cc @@ -8,6 +8,6 @@ extern "C" int func(); -int main() { +int main(void) { return func(); } diff --git a/test cases/common/22 target arg/prog2.cc b/test cases/common/22 target arg/prog2.cc index 8158d14..e2ffe62 100644 --- a/test cases/common/22 target arg/prog2.cc +++ b/test cases/common/22 target arg/prog2.cc @@ -8,6 +8,6 @@ extern "C" int func(); -int main() { +int main(void) { return func(); } diff --git a/test cases/common/222 source set realistic example/main.cc b/test cases/common/222 source set realistic example/main.cc index 97afab1..2b55217 100644 --- a/test cases/common/222 source set realistic example/main.cc +++ b/test cases/common/222 source set realistic example/main.cc @@ -15,7 +15,7 @@ Device::~Device() {} Dependency::Dependency() { this->next = deps; deps = this; } Dependency::~Dependency() {} -int main() +int main(void) { some_random_function(); for (auto d = deps; d; d = d->next) diff --git a/test cases/common/223 custom target input extracted objects/libdir/source.c b/test cases/common/223 custom target input extracted objects/libdir/source.c index 7779b33..1dc08e1 100644 --- a/test cases/common/223 custom target input extracted objects/libdir/source.c +++ b/test cases/common/223 custom target input extracted objects/libdir/source.c @@ -1,3 +1,3 @@ -int func1_in_obj() { +int func1_in_obj(void) { return 0; } diff --git a/test cases/common/23 object extraction/lib.c b/test cases/common/23 object extraction/lib.c index 652f4eb..8180551 100644 --- a/test cases/common/23 object extraction/lib.c +++ b/test cases/common/23 object extraction/lib.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 42; } diff --git a/test cases/common/23 object extraction/lib2.c b/test cases/common/23 object extraction/lib2.c index c30dde2..5020593 100644 --- a/test cases/common/23 object extraction/lib2.c +++ b/test cases/common/23 object extraction/lib2.c @@ -1,3 +1,3 @@ -int retval() { +int retval(void) { return 43; } diff --git a/test cases/common/23 object extraction/main.c b/test cases/common/23 object extraction/main.c index 5536c36..27162c5 100644 --- a/test cases/common/23 object extraction/main.c +++ b/test cases/common/23 object extraction/main.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func() == 42 ? 0 : 1; diff --git a/test cases/common/23 object extraction/src/lib.c b/test cases/common/23 object extraction/src/lib.c index 652f4eb..8180551 100644 --- a/test cases/common/23 object extraction/src/lib.c +++ b/test cases/common/23 object extraction/src/lib.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 42; } diff --git a/test cases/common/25 library versions/lib.c b/test cases/common/25 library versions/lib.c index 10019dc..e49cb2d 100644 --- a/test cases/common/25 library versions/lib.c +++ b/test cases/common/25 library versions/lib.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC myFunc() { +int DLL_PUBLIC myFunc(void) { return 55; } diff --git a/test cases/common/27 pipeline/depends/libsrc.c.in b/test cases/common/27 pipeline/depends/libsrc.c.in index 652f4eb..8180551 100644 --- a/test cases/common/27 pipeline/depends/libsrc.c.in +++ b/test cases/common/27 pipeline/depends/libsrc.c.in @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 42; } diff --git a/test cases/common/27 pipeline/depends/prog.c b/test cases/common/27 pipeline/depends/prog.c index 8bd6e03..54c40e1 100644 --- a/test cases/common/27 pipeline/depends/prog.c +++ b/test cases/common/27 pipeline/depends/prog.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func() != 42; diff --git a/test cases/common/27 pipeline/input_src.dat b/test cases/common/27 pipeline/input_src.dat index 7412372..a324dca 100644 --- a/test cases/common/27 pipeline/input_src.dat +++ b/test cases/common/27 pipeline/input_src.dat @@ -1 +1 @@ -int func() { return 0; } +int func(void) { return 0; } diff --git a/test cases/common/27 pipeline/prog.c b/test cases/common/27 pipeline/prog.c index 7bd54d4..128f2bb 100644 --- a/test cases/common/27 pipeline/prog.c +++ b/test cases/common/27 pipeline/prog.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func(); diff --git a/test cases/common/28 find program/source.in b/test cases/common/28 find program/source.in index 4cce7f6..03b2213 100644 --- a/test cases/common/28 find program/source.in +++ b/test cases/common/28 find program/source.in @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 0; } diff --git a/test cases/common/29 multiline string/meson.build b/test cases/common/29 multiline string/meson.build index 8ed153c..9cec114 100644 --- a/test cases/common/29 multiline string/meson.build +++ b/test cases/common/29 multiline string/meson.build @@ -26,7 +26,7 @@ endif cc = meson.get_compiler('c') prog = ''' -int main() { +int main(void) { int num = 1; printf("%d\n", num); return 0; diff --git a/test cases/common/3 static/libfile.c b/test cases/common/3 static/libfile.c index 80a427b..846485e 100644 --- a/test cases/common/3 static/libfile.c +++ b/test cases/common/3 static/libfile.c @@ -1,3 +1,3 @@ -int libfunc() { +int libfunc(void) { return 3; } diff --git a/test cases/common/3 static/libfile2.c b/test cases/common/3 static/libfile2.c index 86bbb2c..4df60c5 100644 --- a/test cases/common/3 static/libfile2.c +++ b/test cases/common/3 static/libfile2.c @@ -1,3 +1,3 @@ -int libfunc2() { +int libfunc2(void) { return 4; } diff --git a/test cases/common/30 try compile/invalid.c b/test cases/common/30 try compile/invalid.c index b623bf8..6c9cfb8 100644 --- a/test cases/common/30 try compile/invalid.c +++ b/test cases/common/30 try compile/invalid.c @@ -1,2 +1,2 @@ #include<nonexisting.h> -void func() { printf("This won't work.\n"); } +void func(void) { printf("This won't work.\n"); } diff --git a/test cases/common/30 try compile/meson.build b/test cases/common/30 try compile/meson.build index 09ca395..cb41e1d 100644 --- a/test cases/common/30 try compile/meson.build +++ b/test cases/common/30 try compile/meson.build @@ -1,11 +1,11 @@ project('try compile', 'c', 'cpp') code = '''#include<stdio.h> -void func() { printf("Something.\n"); } +void func(void) { printf("Something.\n"); } ''' breakcode = '''#include<nonexisting.h> -void func() { printf("This won't work.\n"); } +void func(void) { printf("This won't work.\n"); } ''' foreach compiler : [meson.get_compiler('c'), meson.get_compiler('cpp')] diff --git a/test cases/common/30 try compile/valid.c b/test cases/common/30 try compile/valid.c index 3757f5a..f8e76f4 100644 --- a/test cases/common/30 try compile/valid.c +++ b/test cases/common/30 try compile/valid.c @@ -1,2 +1,2 @@ #include<stdio.h> -void func() { printf("Something.\n"); } +void func(void) { printf("Something.\n"); } diff --git a/test cases/common/32 sizeof/prog.c.in b/test cases/common/32 sizeof/prog.c.in index 99432f7..44918ec 100644 --- a/test cases/common/32 sizeof/prog.c.in +++ b/test cases/common/32 sizeof/prog.c.in @@ -2,7 +2,7 @@ #include <stdio.h> #include <wchar.h> -int main() { +int main(void) { if(INTSIZE != sizeof(int)) { fprintf(stderr, "Mismatch: detected int size %d, actual size %d.\n", INTSIZE, (int)sizeof(int)); return 1; diff --git a/test cases/common/36 tryrun/error.c b/test cases/common/36 tryrun/error.c index 16db28e..53ef08e 100644 --- a/test cases/common/36 tryrun/error.c +++ b/test cases/common/36 tryrun/error.c @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 1; } diff --git a/test cases/common/36 tryrun/meson.build b/test cases/common/36 tryrun/meson.build index 6682a33..261adf2 100644 --- a/test cases/common/36 tryrun/meson.build +++ b/test cases/common/36 tryrun/meson.build @@ -12,19 +12,19 @@ else endif ok_code = '''#include<stdio.h> -int main() { +int main(void) { printf("%s\n", "stdout"); fprintf(stderr, "%s\n", "stderr"); return 0; } ''' -error_code = '''int main() { +error_code = '''int main(void) { return 1; } ''' -no_compile_code = '''int main() { +no_compile_code = '''int main(void) { ''' INPUTS = [ diff --git a/test cases/common/36 tryrun/no_compile.c b/test cases/common/36 tryrun/no_compile.c index b3b753c..496c2e8 100644 --- a/test cases/common/36 tryrun/no_compile.c +++ b/test cases/common/36 tryrun/no_compile.c @@ -1 +1 @@ -int main() { +int main(void) { diff --git a/test cases/common/4 shared/libfile.c b/test cases/common/4 shared/libfile.c index daabb65..0797eec 100644 --- a/test cases/common/4 shared/libfile.c +++ b/test cases/common/4 shared/libfile.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC libfunc() { +int DLL_PUBLIC libfunc(void) { return 3; } diff --git a/test cases/common/42 library chain/main.c b/test cases/common/42 library chain/main.c index 7754755..9c88e73 100644 --- a/test cases/common/42 library chain/main.c +++ b/test cases/common/42 library chain/main.c @@ -1,4 +1,4 @@ -int libfun(); +int libfun(void); int main(void) { return libfun(); diff --git a/test cases/common/42 library chain/subdir/lib1.c b/test cases/common/42 library chain/subdir/lib1.c index 499ef82..88436b2 100644 --- a/test cases/common/42 library chain/subdir/lib1.c +++ b/test cases/common/42 library chain/subdir/lib1.c @@ -1,5 +1,5 @@ -int lib2fun(); -int lib3fun(); +int lib2fun(void); +int lib3fun(void); #if defined _WIN32 || defined __CYGWIN__ #define DLL_PUBLIC __declspec(dllexport) @@ -12,6 +12,6 @@ int lib3fun(); #endif #endif -int DLL_PUBLIC libfun() { +int DLL_PUBLIC libfun(void) { return lib2fun() + lib3fun(); } diff --git a/test cases/common/42 library chain/subdir/subdir2/lib2.c b/test cases/common/42 library chain/subdir/subdir2/lib2.c index 34fadf2..e788f07 100644 --- a/test cases/common/42 library chain/subdir/subdir2/lib2.c +++ b/test cases/common/42 library chain/subdir/subdir2/lib2.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC lib2fun() { +int DLL_PUBLIC lib2fun(void) { return 0; } diff --git a/test cases/common/42 library chain/subdir/subdir3/lib3.c b/test cases/common/42 library chain/subdir/subdir3/lib3.c index 7bd88af..a99c64e 100644 --- a/test cases/common/42 library chain/subdir/subdir3/lib3.c +++ b/test cases/common/42 library chain/subdir/subdir3/lib3.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC lib3fun() { +int DLL_PUBLIC lib3fun(void) { return 0; } diff --git a/test cases/common/45 subproject/subprojects/sublib/include/subdefs.h b/test cases/common/45 subproject/subprojects/sublib/include/subdefs.h index 681c7b8..6ae8462 100644 --- a/test cases/common/45 subproject/subprojects/sublib/include/subdefs.h +++ b/test cases/common/45 subproject/subprojects/sublib/include/subdefs.h @@ -16,6 +16,6 @@ #endif #endif -int DLL_PUBLIC subfunc(); +int DLL_PUBLIC subfunc(void); #endif diff --git a/test cases/common/45 subproject/subprojects/sublib/sublib.c b/test cases/common/45 subproject/subprojects/sublib/sublib.c index c13326b..f71564f 100644 --- a/test cases/common/45 subproject/subprojects/sublib/sublib.c +++ b/test cases/common/45 subproject/subprojects/sublib/sublib.c @@ -1,5 +1,5 @@ #include<subdefs.h> -int DLL_PUBLIC subfunc() { +int DLL_PUBLIC subfunc(void) { return 42; } diff --git a/test cases/common/47 pkgconfig-gen/dependencies/custom.c b/test cases/common/47 pkgconfig-gen/dependencies/custom.c index 2cc5651..1d3deca 100644 --- a/test cases/common/47 pkgconfig-gen/dependencies/custom.c +++ b/test cases/common/47 pkgconfig-gen/dependencies/custom.c @@ -1,3 +1,3 @@ -int custom_function() { +int custom_function(void) { return 42; } diff --git a/test cases/common/47 pkgconfig-gen/dependencies/exposed.c b/test cases/common/47 pkgconfig-gen/dependencies/exposed.c index 005202e..caa4591 100644 --- a/test cases/common/47 pkgconfig-gen/dependencies/exposed.c +++ b/test cases/common/47 pkgconfig-gen/dependencies/exposed.c @@ -1,3 +1,3 @@ -int exposed_function() { +int exposed_function(void) { return 42; } diff --git a/test cases/common/47 pkgconfig-gen/dependencies/internal.c b/test cases/common/47 pkgconfig-gen/dependencies/internal.c index 1a41b11..23b07ec 100644 --- a/test cases/common/47 pkgconfig-gen/dependencies/internal.c +++ b/test cases/common/47 pkgconfig-gen/dependencies/internal.c @@ -1,3 +1,3 @@ -int internal_function() { +int internal_function(void) { return 42; } diff --git a/test cases/common/47 pkgconfig-gen/simple.c b/test cases/common/47 pkgconfig-gen/simple.c index e8a6d83..ff86f31 100644 --- a/test cases/common/47 pkgconfig-gen/simple.c +++ b/test cases/common/47 pkgconfig-gen/simple.c @@ -1,5 +1,5 @@ #include"simple.h" -int simple_function() { +int simple_function(void) { return 42; } diff --git a/test cases/common/47 pkgconfig-gen/simple.h b/test cases/common/47 pkgconfig-gen/simple.h index bb52e6d..6896bfd 100644 --- a/test cases/common/47 pkgconfig-gen/simple.h +++ b/test cases/common/47 pkgconfig-gen/simple.h @@ -1,6 +1,6 @@ #ifndef SIMPLE_H_ #define SIMPLE_H_ -int simple_function(); +int simple_function(void); #endif diff --git a/test cases/common/49 subproject subproject/prog.c b/test cases/common/49 subproject subproject/prog.c index 5536c36..27162c5 100644 --- a/test cases/common/49 subproject subproject/prog.c +++ b/test cases/common/49 subproject subproject/prog.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func() == 42 ? 0 : 1; diff --git a/test cases/common/49 subproject subproject/subprojects/a/a.c b/test cases/common/49 subproject subproject/subprojects/a/a.c index 7ac3e5e..f9848c1 100644 --- a/test cases/common/49 subproject subproject/subprojects/a/a.c +++ b/test cases/common/49 subproject subproject/subprojects/a/a.c @@ -1,4 +1,4 @@ -int func2(); +int func2(void); #if defined _WIN32 || defined __CYGWIN__ #define DLL_PUBLIC __declspec(dllexport) @@ -11,5 +11,5 @@ int func2(); #endif #endif -int DLL_PUBLIC func() { return func2(); } +int DLL_PUBLIC func(void) { return func2(); } diff --git a/test cases/common/49 subproject subproject/subprojects/b/b.c b/test cases/common/49 subproject subproject/subprojects/b/b.c index a95651b..8c07177 100644 --- a/test cases/common/49 subproject subproject/subprojects/b/b.c +++ b/test cases/common/49 subproject subproject/subprojects/b/b.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC func2() { +int DLL_PUBLIC func2(void) { return 42; } diff --git a/test cases/common/5 linkstatic/libfile.c b/test cases/common/5 linkstatic/libfile.c index 6f1c172..9180030 100644 --- a/test cases/common/5 linkstatic/libfile.c +++ b/test cases/common/5 linkstatic/libfile.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 0; } diff --git a/test cases/common/5 linkstatic/libfile2.c b/test cases/common/5 linkstatic/libfile2.c index 89780f5..5badf23 100644 --- a/test cases/common/5 linkstatic/libfile2.c +++ b/test cases/common/5 linkstatic/libfile2.c @@ -1,3 +1,3 @@ -int func2() { +int func2(void) { return 2; } diff --git a/test cases/common/5 linkstatic/libfile3.c b/test cases/common/5 linkstatic/libfile3.c index 5e0d08b..4bfe52a 100644 --- a/test cases/common/5 linkstatic/libfile3.c +++ b/test cases/common/5 linkstatic/libfile3.c @@ -1,3 +1,3 @@ -int func3() { +int func3(void) { return 3; } diff --git a/test cases/common/5 linkstatic/libfile4.c b/test cases/common/5 linkstatic/libfile4.c index 3645c31..ce1fe68 100644 --- a/test cases/common/5 linkstatic/libfile4.c +++ b/test cases/common/5 linkstatic/libfile4.c @@ -1,3 +1,3 @@ -int func4() { +int func4(void) { return 4; } diff --git a/test cases/common/5 linkstatic/main.c b/test cases/common/5 linkstatic/main.c index 7bd54d4..128f2bb 100644 --- a/test cases/common/5 linkstatic/main.c +++ b/test cases/common/5 linkstatic/main.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func(); diff --git a/test cases/common/50 same file name/d1/file.c b/test cases/common/50 same file name/d1/file.c index 8084d73..46e5172 100644 --- a/test cases/common/50 same file name/d1/file.c +++ b/test cases/common/50 same file name/d1/file.c @@ -1 +1 @@ -int func1() { return 42; } +int func1(void) { return 42; } diff --git a/test cases/common/50 same file name/d2/file.c b/test cases/common/50 same file name/d2/file.c index d1444a2..3d367f1 100644 --- a/test cases/common/50 same file name/d2/file.c +++ b/test cases/common/50 same file name/d2/file.c @@ -1 +1 @@ -int func2() { return 42; } +int func2(void) { return 42; } diff --git a/test cases/common/50 same file name/prog.c b/test cases/common/50 same file name/prog.c index 61bc874..1eee6c2 100644 --- a/test cases/common/50 same file name/prog.c +++ b/test cases/common/50 same file name/prog.c @@ -1,5 +1,5 @@ -int func1(); -int func2(); +int func1(void); +int func2(void); int main(void) { return func1() - func2(); diff --git a/test cases/common/51 file grabber/a.c b/test cases/common/51 file grabber/a.c index bee8ad7..8f63c2d 100644 --- a/test cases/common/51 file grabber/a.c +++ b/test cases/common/51 file grabber/a.c @@ -1 +1 @@ -int funca() { return 0; } +int funca(void) { return 0; } diff --git a/test cases/common/51 file grabber/b.c b/test cases/common/51 file grabber/b.c index 0fdd162..f38baca 100644 --- a/test cases/common/51 file grabber/b.c +++ b/test cases/common/51 file grabber/b.c @@ -1 +1 @@ -int funcb() { return 0; } +int funcb(void) { return 0; } diff --git a/test cases/common/51 file grabber/c.c b/test cases/common/51 file grabber/c.c index 63f951c..2e8abbf 100644 --- a/test cases/common/51 file grabber/c.c +++ b/test cases/common/51 file grabber/c.c @@ -1 +1 @@ -int funcc() { return 0; } +int funcc(void) { return 0; } diff --git a/test cases/common/51 file grabber/prog.c b/test cases/common/51 file grabber/prog.c index 47ccc30..ff55723 100644 --- a/test cases/common/51 file grabber/prog.c +++ b/test cases/common/51 file grabber/prog.c @@ -1,6 +1,6 @@ -int funca(); -int funcb(); -int funcc(); +int funca(void); +int funcb(void); +int funcc(void); int main(void) { return funca() + funcb() + funcc(); diff --git a/test cases/common/51 file grabber/subdir/suba.c b/test cases/common/51 file grabber/subdir/suba.c index bee8ad7..8f63c2d 100644 --- a/test cases/common/51 file grabber/subdir/suba.c +++ b/test cases/common/51 file grabber/subdir/suba.c @@ -1 +1 @@ -int funca() { return 0; } +int funca(void) { return 0; } diff --git a/test cases/common/51 file grabber/subdir/subb.c b/test cases/common/51 file grabber/subdir/subb.c index 0fdd162..f38baca 100644 --- a/test cases/common/51 file grabber/subdir/subb.c +++ b/test cases/common/51 file grabber/subdir/subb.c @@ -1 +1 @@ -int funcb() { return 0; } +int funcb(void) { return 0; } diff --git a/test cases/common/51 file grabber/subdir/subc.c b/test cases/common/51 file grabber/subdir/subc.c index 63f951c..2e8abbf 100644 --- a/test cases/common/51 file grabber/subdir/subc.c +++ b/test cases/common/51 file grabber/subdir/subc.c @@ -1 +1 @@ -int funcc() { return 0; } +int funcc(void) { return 0; } diff --git a/test cases/common/51 file grabber/subdir/subprog.c b/test cases/common/51 file grabber/subdir/subprog.c index 47ccc30..ff55723 100644 --- a/test cases/common/51 file grabber/subdir/subprog.c +++ b/test cases/common/51 file grabber/subdir/subprog.c @@ -1,6 +1,6 @@ -int funca(); -int funcb(); -int funcc(); +int funca(void); +int funcb(void); +int funcc(void); int main(void) { return funca() + funcb() + funcc(); diff --git a/test cases/common/55 object generator/prog.c b/test cases/common/55 object generator/prog.c index dc468ec..9841180 100644 --- a/test cases/common/55 object generator/prog.c +++ b/test cases/common/55 object generator/prog.c @@ -1,6 +1,6 @@ -int func1_in_obj(); -int func2_in_obj(); -int func3_in_obj(); +int func1_in_obj(void); +int func2_in_obj(void); +int func3_in_obj(void); int main(void) { return func1_in_obj() + func2_in_obj() + func3_in_obj(); diff --git a/test cases/common/55 object generator/source.c b/test cases/common/55 object generator/source.c index 7779b33..1dc08e1 100644 --- a/test cases/common/55 object generator/source.c +++ b/test cases/common/55 object generator/source.c @@ -1,3 +1,3 @@ -int func1_in_obj() { +int func1_in_obj(void) { return 0; } diff --git a/test cases/common/55 object generator/source2.c b/test cases/common/55 object generator/source2.c index 29aad40..8024b97 100644 --- a/test cases/common/55 object generator/source2.c +++ b/test cases/common/55 object generator/source2.c @@ -1,3 +1,3 @@ -int func2_in_obj() { +int func2_in_obj(void) { return 0; } diff --git a/test cases/common/55 object generator/source3.c b/test cases/common/55 object generator/source3.c index 1580f1e..c4362c4 100644 --- a/test cases/common/55 object generator/source3.c +++ b/test cases/common/55 object generator/source3.c @@ -1,3 +1,3 @@ -int func3_in_obj() { +int func3_in_obj(void) { return 0; } diff --git a/test cases/common/57 custom target source output/generator.py b/test cases/common/57 custom target source output/generator.py index 3464b0a..1bec8e8 100755 --- a/test cases/common/57 custom target source output/generator.py +++ b/test cases/common/57 custom target source output/generator.py @@ -8,9 +8,9 @@ if len(sys.argv) != 2: odir = sys.argv[1] with open(os.path.join(odir, 'mylib.h'), 'w') as f: - f.write('int func();\n') + f.write('int func(void);\n') with open(os.path.join(odir, 'mylib.c'), 'w') as f: - f.write('''int func() { + f.write('''int func(void) { return 0; } ''') diff --git a/test cases/common/58 exe static shared/prog.c b/test cases/common/58 exe static shared/prog.c index 3ba9a8f..6dba60d 100644 --- a/test cases/common/58 exe static shared/prog.c +++ b/test cases/common/58 exe static shared/prog.c @@ -1,5 +1,5 @@ -int shlibfunc2(); -int statlibfunc(); +int shlibfunc2(void); +int statlibfunc(void); int main(void) { if (statlibfunc() != 42) diff --git a/test cases/common/58 exe static shared/stat.c b/test cases/common/58 exe static shared/stat.c index 680ed92..eddc4d8 100644 --- a/test cases/common/58 exe static shared/stat.c +++ b/test cases/common/58 exe static shared/stat.c @@ -1,7 +1,7 @@ #include "subdir/exports.h" -int shlibfunc(); +int shlibfunc(void); -int DLL_PUBLIC statlibfunc() { +int DLL_PUBLIC statlibfunc(void) { return shlibfunc(); } diff --git a/test cases/common/58 exe static shared/stat2.c b/test cases/common/58 exe static shared/stat2.c index 4ae3775..4abb49f 100644 --- a/test cases/common/58 exe static shared/stat2.c +++ b/test cases/common/58 exe static shared/stat2.c @@ -1,3 +1,3 @@ -int statlibfunc2() { +int statlibfunc2(void) { return 18; } diff --git a/test cases/common/58 exe static shared/subdir/shlib.c b/test cases/common/58 exe static shared/subdir/shlib.c index 002c83f..dd9c6b2 100644 --- a/test cases/common/58 exe static shared/subdir/shlib.c +++ b/test cases/common/58 exe static shared/subdir/shlib.c @@ -1,5 +1,5 @@ #include "exports.h" -int DLL_PUBLIC shlibfunc() { +int DLL_PUBLIC shlibfunc(void) { return 42; } diff --git a/test cases/common/6 linkshared/cpplib.cpp b/test cases/common/6 linkshared/cpplib.cpp index 8b3e0d2..395859d 100644 --- a/test cases/common/6 linkshared/cpplib.cpp +++ b/test cases/common/6 linkshared/cpplib.cpp @@ -4,6 +4,6 @@ #define DLL_PUBLIC __attribute__ ((visibility ("default"))) #endif -int DLL_PUBLIC cppfunc() { +int DLL_PUBLIC cppfunc(void) { return 42; } diff --git a/test cases/common/6 linkshared/cppmain.cpp b/test cases/common/6 linkshared/cppmain.cpp index a7e27db..8e16485 100644 --- a/test cases/common/6 linkshared/cppmain.cpp +++ b/test cases/common/6 linkshared/cppmain.cpp @@ -1,5 +1,5 @@ -int cppfunc(); +int cppfunc(void); -int main() { +int main(void) { return cppfunc() != 42; } diff --git a/test cases/common/6 linkshared/libfile.c b/test cases/common/6 linkshared/libfile.c index 44f7667..91489b2 100644 --- a/test cases/common/6 linkshared/libfile.c +++ b/test cases/common/6 linkshared/libfile.c @@ -9,6 +9,6 @@ #endif #endif -int DLL_PUBLIC func() { +int DLL_PUBLIC func(void) { return 0; } diff --git a/test cases/common/6 linkshared/main.c b/test cases/common/6 linkshared/main.c index 81320e5..7777327 100644 --- a/test cases/common/6 linkshared/main.c +++ b/test cases/common/6 linkshared/main.c @@ -4,7 +4,7 @@ #define DLL_IMPORT #endif -int DLL_IMPORT func(); +int DLL_IMPORT func(void); int main(void) { return func(); diff --git a/test cases/common/61 multiple generators/main.cpp b/test cases/common/61 multiple generators/main.cpp index 82027c8..f1a01bd 100644 --- a/test cases/common/61 multiple generators/main.cpp +++ b/test cases/common/61 multiple generators/main.cpp @@ -1,6 +1,6 @@ #include"source1.h" #include"source2.h" -int main() { +int main(void) { return func1() + func2(); } diff --git a/test cases/common/7 mixed/func.c b/test cases/common/7 mixed/func.c index 9019a81..c76c23d 100644 --- a/test cases/common/7 mixed/func.c +++ b/test cases/common/7 mixed/func.c @@ -1,4 +1,4 @@ -int func() { +int func(void) { int class = 0; return class; } diff --git a/test cases/common/7 mixed/main.cc b/test cases/common/7 mixed/main.cc index 29c680f..9a7a7a6 100644 --- a/test cases/common/7 mixed/main.cc +++ b/test cases/common/7 mixed/main.cc @@ -2,6 +2,6 @@ extern "C" int func(); class BreakPlainCCompiler; -int main() { +int main(void) { return func(); } diff --git a/test cases/common/75 shared subproject/a.c b/test cases/common/75 shared subproject/a.c index 5b1208d..7510a1b 100644 --- a/test cases/common/75 shared subproject/a.c +++ b/test cases/common/75 shared subproject/a.c @@ -1,6 +1,6 @@ #include<assert.h> -char func_b(); -char func_c(); +char func_b(void); +char func_c(void); int main(void) { if(func_b() != 'b') { diff --git a/test cases/common/75 shared subproject/subprojects/B/b.c b/test cases/common/75 shared subproject/subprojects/B/b.c index a1f3a51..b8c7d83 100644 --- a/test cases/common/75 shared subproject/subprojects/B/b.c +++ b/test cases/common/75 shared subproject/subprojects/B/b.c @@ -11,9 +11,9 @@ #endif -char func_c(); +char func_c(void); -char DLL_PUBLIC func_b() { +char DLL_PUBLIC func_b(void) { if(func_c() != 'c') { exit(3); } diff --git a/test cases/common/75 shared subproject/subprojects/C/c.c b/test cases/common/75 shared subproject/subprojects/C/c.c index eebfb9f..facd199 100644 --- a/test cases/common/75 shared subproject/subprojects/C/c.c +++ b/test cases/common/75 shared subproject/subprojects/C/c.c @@ -9,6 +9,6 @@ #endif #endif -char DLL_PUBLIC func_c() { +char DLL_PUBLIC func_c(void) { return 'c'; } diff --git a/test cases/common/76 shared subproject 2/a.c b/test cases/common/76 shared subproject 2/a.c index 5b1208d..7510a1b 100644 --- a/test cases/common/76 shared subproject 2/a.c +++ b/test cases/common/76 shared subproject 2/a.c @@ -1,6 +1,6 @@ #include<assert.h> -char func_b(); -char func_c(); +char func_b(void); +char func_c(void); int main(void) { if(func_b() != 'b') { diff --git a/test cases/common/76 shared subproject 2/subprojects/B/b.c b/test cases/common/76 shared subproject 2/subprojects/B/b.c index 4c94ee9..4d71c0f 100644 --- a/test cases/common/76 shared subproject 2/subprojects/B/b.c +++ b/test cases/common/76 shared subproject 2/subprojects/B/b.c @@ -1,5 +1,5 @@ #include<stdlib.h> -char func_c(); +char func_c(void); #if defined _WIN32 || defined __CYGWIN__ #define DLL_PUBLIC __declspec(dllexport) @@ -12,7 +12,7 @@ char func_c(); #endif #endif -char DLL_PUBLIC func_b() { +char DLL_PUBLIC func_b(void) { if(func_c() != 'c') { exit(3); } diff --git a/test cases/common/76 shared subproject 2/subprojects/C/c.c b/test cases/common/76 shared subproject 2/subprojects/C/c.c index eebfb9f..facd199 100644 --- a/test cases/common/76 shared subproject 2/subprojects/C/c.c +++ b/test cases/common/76 shared subproject 2/subprojects/C/c.c @@ -9,6 +9,6 @@ #endif #endif -char DLL_PUBLIC func_c() { +char DLL_PUBLIC func_c(void) { return 'c'; } diff --git a/test cases/common/77 file object/lib.c b/test cases/common/77 file object/lib.c index 6f1c172..9180030 100644 --- a/test cases/common/77 file object/lib.c +++ b/test cases/common/77 file object/lib.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 0; } diff --git a/test cases/common/77 file object/prog.c b/test cases/common/77 file object/prog.c index e4a786c..78c6acc 100644 --- a/test cases/common/77 file object/prog.c +++ b/test cases/common/77 file object/prog.c @@ -1,6 +1,6 @@ #include<stdio.h> -int func(); /* Files in different subdirs return different values. */ +int func(void); /* Files in different subdirs return different values. */ int main(void) { if(func() == 0) { diff --git a/test cases/common/77 file object/subdir1/lib.c b/test cases/common/77 file object/subdir1/lib.c index bc1e7b0..8c13c21 100644 --- a/test cases/common/77 file object/subdir1/lib.c +++ b/test cases/common/77 file object/subdir1/lib.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 1; } diff --git a/test cases/common/77 file object/subdir1/prog.c b/test cases/common/77 file object/subdir1/prog.c index 1a09f7f..38d13d2 100644 --- a/test cases/common/77 file object/subdir1/prog.c +++ b/test cases/common/77 file object/subdir1/prog.c @@ -1,6 +1,6 @@ #include<stdio.h> -int func(); +int func(void); int main(void) { if(func() == 1) { diff --git a/test cases/common/77 file object/subdir2/lib.c b/test cases/common/77 file object/subdir2/lib.c index cfef4d0..8e2b4eb 100644 --- a/test cases/common/77 file object/subdir2/lib.c +++ b/test cases/common/77 file object/subdir2/lib.c @@ -1,3 +1,3 @@ -int func() { +int func(void) { return 2; } diff --git a/test cases/common/77 file object/subdir2/prog.c b/test cases/common/77 file object/subdir2/prog.c index 558e5ee..8a8f0d0 100644 --- a/test cases/common/77 file object/subdir2/prog.c +++ b/test cases/common/77 file object/subdir2/prog.c @@ -1,6 +1,6 @@ #include<stdio.h> -int func(); +int func(void); int main(void) { if(func() == 2) { diff --git a/test cases/common/78 custom subproject dir/a.c b/test cases/common/78 custom subproject dir/a.c index 5b1208d..7510a1b 100644 --- a/test cases/common/78 custom subproject dir/a.c +++ b/test cases/common/78 custom subproject dir/a.c @@ -1,6 +1,6 @@ #include<assert.h> -char func_b(); -char func_c(); +char func_b(void); +char func_c(void); int main(void) { if(func_b() != 'b') { diff --git a/test cases/common/78 custom subproject dir/custom_subproject_dir/B/b.c b/test cases/common/78 custom subproject dir/custom_subproject_dir/B/b.c index 4c94ee9..4d71c0f 100644 --- a/test cases/common/78 custom subproject dir/custom_subproject_dir/B/b.c +++ b/test cases/common/78 custom subproject dir/custom_subproject_dir/B/b.c @@ -1,5 +1,5 @@ #include<stdlib.h> -char func_c(); +char func_c(void); #if defined _WIN32 || defined __CYGWIN__ #define DLL_PUBLIC __declspec(dllexport) @@ -12,7 +12,7 @@ char func_c(); #endif #endif -char DLL_PUBLIC func_b() { +char DLL_PUBLIC func_b(void) { if(func_c() != 'c') { exit(3); } diff --git a/test cases/common/78 custom subproject dir/custom_subproject_dir/C/c.c b/test cases/common/78 custom subproject dir/custom_subproject_dir/C/c.c index eebfb9f..facd199 100644 --- a/test cases/common/78 custom subproject dir/custom_subproject_dir/C/c.c +++ b/test cases/common/78 custom subproject dir/custom_subproject_dir/C/c.c @@ -9,6 +9,6 @@ #endif #endif -char DLL_PUBLIC func_c() { +char DLL_PUBLIC func_c(void) { return 'c'; } diff --git a/test cases/common/8 install/stat.c b/test cases/common/8 install/stat.c index fa76a65..4825cef 100644 --- a/test cases/common/8 install/stat.c +++ b/test cases/common/8 install/stat.c @@ -1 +1 @@ -int func() { return 933; } +int func(void) { return 933; } diff --git a/test cases/common/80 extract from nested subdir/src/first/lib_first.c b/test cases/common/80 extract from nested subdir/src/first/lib_first.c index 3004906..5fc3267 100644 --- a/test cases/common/80 extract from nested subdir/src/first/lib_first.c +++ b/test cases/common/80 extract from nested subdir/src/first/lib_first.c @@ -1,3 +1,3 @@ -int first() { +int first(void) { return 1001; } diff --git a/test cases/common/81 internal dependency/proj1/include/proj1.h b/test cases/common/81 internal dependency/proj1/include/proj1.h index ded6f75..ecb1e4b 100644 --- a/test cases/common/81 internal dependency/proj1/include/proj1.h +++ b/test cases/common/81 internal dependency/proj1/include/proj1.h @@ -1,5 +1,5 @@ #pragma once -void proj1_func1(); -void proj1_func2(); -void proj1_func3(); +void proj1_func1(void); +void proj1_func2(void); +void proj1_func3(void); diff --git a/test cases/common/81 internal dependency/proj1/proj1f1.c b/test cases/common/81 internal dependency/proj1/proj1f1.c index 9077f4f..69fa823 100644 --- a/test cases/common/81 internal dependency/proj1/proj1f1.c +++ b/test cases/common/81 internal dependency/proj1/proj1f1.c @@ -1,6 +1,6 @@ #include<proj1.h> #include<stdio.h> -void proj1_func1() { +void proj1_func1(void) { printf("In proj1_func1.\n"); } diff --git a/test cases/common/81 internal dependency/proj1/proj1f2.c b/test cases/common/81 internal dependency/proj1/proj1f2.c index 374ee4e..7dd621c 100644 --- a/test cases/common/81 internal dependency/proj1/proj1f2.c +++ b/test cases/common/81 internal dependency/proj1/proj1f2.c @@ -1,6 +1,6 @@ #include<proj1.h> #include<stdio.h> -void proj1_func2() { +void proj1_func2(void) { printf("In proj1_func2.\n"); } diff --git a/test cases/common/81 internal dependency/proj1/proj1f3.c b/test cases/common/81 internal dependency/proj1/proj1f3.c index 8c8fca4..2861ddc 100644 --- a/test cases/common/81 internal dependency/proj1/proj1f3.c +++ b/test cases/common/81 internal dependency/proj1/proj1f3.c @@ -1,6 +1,6 @@ #include<proj1.h> #include<stdio.h> -void proj1_func3() { +void proj1_func3(void) { printf("In proj1_func3.\n"); } diff --git a/test cases/common/82 same basename/exe1.c b/test cases/common/82 same basename/exe1.c index 7bd54d4..128f2bb 100644 --- a/test cases/common/82 same basename/exe1.c +++ b/test cases/common/82 same basename/exe1.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func(); diff --git a/test cases/common/82 same basename/exe2.c b/test cases/common/82 same basename/exe2.c index 6c47a9d..d2d8995 100644 --- a/test cases/common/82 same basename/exe2.c +++ b/test cases/common/82 same basename/exe2.c @@ -1,4 +1,4 @@ -int func(); +int func(void); int main(void) { return func() == 1 ? 0 : 1; diff --git a/test cases/common/82 same basename/lib.c b/test cases/common/82 same basename/lib.c index 6fd432e..b3798e9 100644 --- a/test cases/common/82 same basename/lib.c +++ b/test cases/common/82 same basename/lib.c @@ -10,11 +10,11 @@ #endif #if defined SHAR -int DLL_PUBLIC func() { +int DLL_PUBLIC func(void) { return 1; } #elif defined STAT -int func() { +int func(void) { return 0; } #else diff --git a/test cases/common/83 declare dep/entity/entity.h b/test cases/common/83 declare dep/entity/entity.h index c695b14..959a8c3 100644 --- a/test cases/common/83 declare dep/entity/entity.h +++ b/test cases/common/83 declare dep/entity/entity.h @@ -1,4 +1,4 @@ #pragma once -int entity_func1(); -int entity_func2(); +int entity_func1(void); +int entity_func2(void); diff --git a/test cases/common/83 declare dep/entity/entity1.c b/test cases/common/83 declare dep/entity/entity1.c index 204eb8b..d124e24 100644 --- a/test cases/common/83 declare dep/entity/entity1.c +++ b/test cases/common/83 declare dep/entity/entity1.c @@ -4,6 +4,6 @@ #error "Entity use flag leaked into entity compilation." #endif -int entity_func1() { +int entity_func1(void) { return 5; } diff --git a/test cases/common/83 declare dep/entity/entity2.c b/test cases/common/83 declare dep/entity/entity2.c index f34f546..4e8bb07 100644 --- a/test cases/common/83 declare dep/entity/entity2.c +++ b/test cases/common/83 declare dep/entity/entity2.c @@ -1,5 +1,5 @@ #include<entity.h> -int entity_func2() { +int entity_func2(void) { return 9; } diff --git a/test cases/common/84 extract all/extractor.h b/test cases/common/84 extract all/extractor.h index d0917a1..cfb7ff6 100644 --- a/test cases/common/84 extract all/extractor.h +++ b/test cases/common/84 extract all/extractor.h @@ -1,6 +1,6 @@ #pragma once -int func1(); -int func2(); -int func3(); -int func4(); +int func1(void); +int func2(void); +int func3(void); +int func4(void); diff --git a/test cases/common/84 extract all/four.c b/test cases/common/84 extract all/four.c index 5ca6696..f67a85e 100644 --- a/test cases/common/84 extract all/four.c +++ b/test cases/common/84 extract all/four.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func4() { +int func4(void) { return 4; } diff --git a/test cases/common/84 extract all/one.c b/test cases/common/84 extract all/one.c index cfb0157..152a145 100644 --- a/test cases/common/84 extract all/one.c +++ b/test cases/common/84 extract all/one.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func1() { +int func1(void) { return 1; } diff --git a/test cases/common/84 extract all/three.c b/test cases/common/84 extract all/three.c index c410046..24604ed 100644 --- a/test cases/common/84 extract all/three.c +++ b/test cases/common/84 extract all/three.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func3() { +int func3(void) { return 3; } diff --git a/test cases/common/84 extract all/two.c b/test cases/common/84 extract all/two.c index 3ece512..800cd2d 100644 --- a/test cases/common/84 extract all/two.c +++ b/test cases/common/84 extract all/two.c @@ -1,5 +1,5 @@ #include"extractor.h" -int func2() { +int func2(void) { return 2; } diff --git a/test cases/common/89 private include/stlib/compiler.py b/test cases/common/89 private include/stlib/compiler.py index 98dbe46..c8597dd 100755 --- a/test cases/common/89 private include/stlib/compiler.py +++ b/test cases/common/89 private include/stlib/compiler.py @@ -5,12 +5,12 @@ import sys, os assert(len(sys.argv) == 3) h_templ = '''#pragma once -unsigned int %s(); +unsigned int %s(void); ''' c_templ = '''#include"%s.h" -unsigned int %s() { +unsigned int %s(void) { return 0; } ''' diff --git a/test cases/common/91 dep fallback/subprojects/boblib/bob.c b/test cases/common/91 dep fallback/subprojects/boblib/bob.c index ae0f394..52cf479 100644 --- a/test cases/common/91 dep fallback/subprojects/boblib/bob.c +++ b/test cases/common/91 dep fallback/subprojects/boblib/bob.c @@ -3,6 +3,6 @@ #ifdef _MSC_VER __declspec(dllexport) #endif -const char* get_bob() { +const char* get_bob(void) { return "bob"; } diff --git a/test cases/common/91 dep fallback/subprojects/boblib/bob.h b/test cases/common/91 dep fallback/subprojects/boblib/bob.h index f874ae7..8dd4b33 100644 --- a/test cases/common/91 dep fallback/subprojects/boblib/bob.h +++ b/test cases/common/91 dep fallback/subprojects/boblib/bob.h @@ -3,4 +3,4 @@ #ifdef _MSC_VER __declspec(dllimport) #endif -const char* get_bob(); +const char* get_bob(void); diff --git a/test cases/common/93 selfbuilt custom/mainprog.cpp b/test cases/common/93 selfbuilt custom/mainprog.cpp index 6255028..bb45dca 100644 --- a/test cases/common/93 selfbuilt custom/mainprog.cpp +++ b/test cases/common/93 selfbuilt custom/mainprog.cpp @@ -1,5 +1,5 @@ #include"data.h" -int main() { +int main(void) { return generated_function() != 52; } diff --git a/test cases/common/94 gen extra/name.l b/test cases/common/94 gen extra/name.l index 3adda4f..c4ba277 100644 --- a/test cases/common/94 gen extra/name.l +++ b/test cases/common/94 gen extra/name.l @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 0; } diff --git a/test cases/common/94 gen extra/plain.c b/test cases/common/94 gen extra/plain.c index 6fc3d22..c068a02 100644 --- a/test cases/common/94 gen extra/plain.c +++ b/test cases/common/94 gen extra/plain.c @@ -1,4 +1,4 @@ -int bob_mcbob(); +int bob_mcbob(void); int main(void) { return bob_mcbob(); diff --git a/test cases/common/94 gen extra/srcgen.py b/test cases/common/94 gen extra/srcgen.py index 8988cd9..c64f540 100755 --- a/test cases/common/94 gen extra/srcgen.py +++ b/test cases/common/94 gen extra/srcgen.py @@ -11,7 +11,7 @@ parser.add_argument('--output', dest='output', parser.add_argument('--upper', dest='upper', action='store_true', default=False, help='Convert to upper case.') -c_templ = '''int %s() { +c_templ = '''int %s(void) { return 0; } ''' diff --git a/test cases/common/94 gen extra/upper.c b/test cases/common/94 gen extra/upper.c index f216dce..82c3252 100644 --- a/test cases/common/94 gen extra/upper.c +++ b/test cases/common/94 gen extra/upper.c @@ -1,4 +1,4 @@ -int BOB_MCBOB(); +int BOB_MCBOB(void); int main(void) { return BOB_MCBOB(); diff --git a/test cases/common/98 threads/threadprog.c b/test cases/common/98 threads/threadprog.c index 789f24b..7bfb7c4 100644 --- a/test cases/common/98 threads/threadprog.c +++ b/test cases/common/98 threads/threadprog.c @@ -3,7 +3,7 @@ #include<windows.h> #include<stdio.h> -DWORD WINAPI thread_func() { +DWORD WINAPI thread_func(void) { printf("Printing from a thread.\n"); return 0; } @@ -22,7 +22,7 @@ int main(void) { #include<pthread.h> #include<stdio.h> -void* main_func() { +void* main_func(void) { printf("Printing from a thread.\n"); return NULL; } diff --git a/test cases/common/98 threads/threadprog.cpp b/test cases/common/98 threads/threadprog.cpp index 18fa9f5..3c69dc3 100644 --- a/test cases/common/98 threads/threadprog.cpp +++ b/test cases/common/98 threads/threadprog.cpp @@ -14,7 +14,7 @@ DWORD WINAPI thread_func(LPVOID) { return 0; } -int main() { +int main(void) { printf("Starting thread.\n"); HANDLE th; DWORD id; @@ -28,11 +28,11 @@ int main() { #include<thread> #include<cstdio> -void main_func() { +void main_func(void) { printf("Printing from a thread.\n"); } -int main() { +int main(void) { printf("Starting thread.\n"); std::thread th(main_func); th.join(); diff --git a/test cases/common/99 manygen/subdir/manygen.py b/test cases/common/99 manygen/subdir/manygen.py index 0fbc2ec..d46b2a8 100755 --- a/test cases/common/99 manygen/subdir/manygen.py +++ b/test cases/common/99 manygen/subdir/manygen.py @@ -43,20 +43,20 @@ tmpo = 'diibadaaba' + objsuffix with open(outc, 'w') as f: f.write('''#include"%s.h" -int %s_in_src() { +int %s_in_src(void) { return 0; } ''' % (funcname, funcname)) with open(outh, 'w') as f: f.write('''#pragma once -int %s_in_lib(); -int %s_in_obj(); -int %s_in_src(); +int %s_in_lib(void); +int %s_in_obj(void); +int %s_in_src(void); ''' % (funcname, funcname, funcname)) with open(tmpc, 'w') as f: - f.write('''int %s_in_obj() { + f.write('''int %s_in_obj(void) { return 0; } ''' % funcname) diff --git a/test cases/cuda/10 cuda dependency/c/prog.c b/test cases/cuda/10 cuda dependency/c/prog.c index 9d279a9..e2429a6 100644 --- a/test cases/cuda/10 cuda dependency/c/prog.c +++ b/test cases/cuda/10 cuda dependency/c/prog.c @@ -7,7 +7,7 @@ int cuda_devices() { return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { printf("No CUDA hardware found. Exiting.\n"); diff --git a/test cases/cuda/10 cuda dependency/cpp/prog.cc b/test cases/cuda/10 cuda dependency/cpp/prog.cc index 728debc..4832afa 100644 --- a/test cases/cuda/10 cuda dependency/cpp/prog.cc +++ b/test cases/cuda/10 cuda dependency/cpp/prog.cc @@ -1,13 +1,13 @@ #include <cuda_runtime.h> #include <iostream> -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { std::cout << "No CUDA hardware found. Exiting.\n"; diff --git a/test cases/cuda/10 cuda dependency/modules/prog.cc b/test cases/cuda/10 cuda dependency/modules/prog.cc index 7c52b3f..b4af4d4 100644 --- a/test cases/cuda/10 cuda dependency/modules/prog.cc +++ b/test cases/cuda/10 cuda dependency/modules/prog.cc @@ -2,13 +2,13 @@ #include <cublas_v2.h> #include <iostream> -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { std::cout << "No CUDA hardware found. Exiting.\n"; @@ -24,7 +24,7 @@ int main() { } std::cout << "Initialized cuBLAS\n"; - if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { + if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { std::cout << "cuBLAS de-initialization failed. Exiting.\n"; return -1; } diff --git a/test cases/cuda/10 cuda dependency/version_reqs/prog.cc b/test cases/cuda/10 cuda dependency/version_reqs/prog.cc index e3adabf..5668830 100644 --- a/test cases/cuda/10 cuda dependency/version_reqs/prog.cc +++ b/test cases/cuda/10 cuda dependency/version_reqs/prog.cc @@ -1,13 +1,13 @@ #include <cuda_runtime.h> #include <iostream> -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { std::cout << "Compiled against CUDA version: " << CUDART_VERSION << "\n"; int runtime_version = 0; cudaError_t r = cudaRuntimeGetVersion(&runtime_version); diff --git a/test cases/cuda/12 cuda dependency (mixed)/prog.cpp b/test cases/cuda/12 cuda dependency (mixed)/prog.cpp index daf9102..85e5148 100644 --- a/test cases/cuda/12 cuda dependency (mixed)/prog.cpp +++ b/test cases/cuda/12 cuda dependency (mixed)/prog.cpp @@ -4,13 +4,13 @@ void do_cuda_stuff(); -int cuda_devices() { +int cuda_devices(void) { int result = 0; cudaGetDeviceCount(&result); return result; } -int main() { +int main(void) { int n = cuda_devices(); if (n == 0) { std::cout << "No CUDA hardware found. Exiting.\n"; @@ -28,7 +28,7 @@ int main() { } std::cout << "Initialized cuBLAS\n"; - if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { + if (cublasDestroy(handle) != CUBLAS_STATUS_SUCCESS) { std::cout << "cuBLAS de-initialization failed. Exiting.\n"; return -1; } diff --git a/test cases/failing/16 extract from subproject/main.c b/test cases/failing/16 extract from subproject/main.c index 0ada338..6c8ecae 100644 --- a/test cases/failing/16 extract from subproject/main.c +++ b/test cases/failing/16 extract from subproject/main.c @@ -1,5 +1,5 @@ int sub_lib_method(void); -int main() { +int main(void) { return 1337 - sub_lib_method(); } diff --git a/test cases/failing/93 pch source different folder/prog.c b/test cases/failing/93 pch source different folder/prog.c index c272dab..3fb1295 100644 --- a/test cases/failing/93 pch source different folder/prog.c +++ b/test cases/failing/93 pch source different folder/prog.c @@ -1 +1 @@ -int main() {}
\ No newline at end of file +int main(void) {}
\ No newline at end of file diff --git a/test cases/fortran/9 cpp/main.cpp b/test cases/fortran/9 cpp/main.cpp index a3eeaec..534a23a 100644 --- a/test cases/fortran/9 cpp/main.cpp +++ b/test cases/fortran/9 cpp/main.cpp @@ -2,7 +2,7 @@ extern "C" double fortran(); -int main() { +int main(void) { std::cout << "FORTRAN gave us this number: " << fortran() << '\n'; return 0; } diff --git a/test cases/frameworks/1 boost/partial_dep/main.cpp b/test cases/frameworks/1 boost/partial_dep/main.cpp index 5138f5c..f31c5ec 100644 --- a/test cases/frameworks/1 boost/partial_dep/main.cpp +++ b/test cases/frameworks/1 boost/partial_dep/main.cpp @@ -18,7 +18,7 @@ #include "foo.hpp" -int main() { +int main(void) { auto foo = Foo(); vec v = foo.vector(); std::cout << boost::fusion::at_c<0>(v) << std::endl; diff --git a/test cases/frameworks/18 vulkan/vulkanprog.c b/test cases/frameworks/18 vulkan/vulkanprog.c index 58d63ec..c6b8803 100644 --- a/test cases/frameworks/18 vulkan/vulkanprog.c +++ b/test cases/frameworks/18 vulkan/vulkanprog.c @@ -1,7 +1,7 @@ #include <vulkan/vulkan.h> #include <stdio.h> -int main() +int main(void) { VkInstanceCreateInfo instance_create_info = { VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, @@ -21,6 +21,6 @@ int main() VkInstance instance; if(vkCreateInstance(&instance_create_info, NULL, &instance) == VK_SUCCESS) vkDestroyInstance(instance, NULL); - - return 0; + + return 0; } diff --git a/test cases/frameworks/9 wxwidgets/wxstc.cpp b/test cases/frameworks/9 wxwidgets/wxstc.cpp index 8499ff9..c0c7043 100644 --- a/test cases/frameworks/9 wxwidgets/wxstc.cpp +++ b/test cases/frameworks/9 wxwidgets/wxstc.cpp @@ -1,6 +1,6 @@ #include <wx/stc/stc.h> -int main() { +int main(void) { wxStyledTextCtrl *canvas = new wxStyledTextCtrl(); delete canvas; } diff --git a/test cases/linuxlike/1 pkg-config/meson.build b/test cases/linuxlike/1 pkg-config/meson.build index 87a6e65..ca48e9b 100644 --- a/test cases/linuxlike/1 pkg-config/meson.build +++ b/test cases/linuxlike/1 pkg-config/meson.build @@ -39,7 +39,7 @@ cc = meson.get_compiler('c') zlibdep = cc.find_library('z') code = '''#include<myinc.h> -int main() { +int main(void) { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/1 pkg-config/prog-checkver.c b/test cases/linuxlike/1 pkg-config/prog-checkver.c index 9c5f4f2..ea1ed32 100644 --- a/test cases/linuxlike/1 pkg-config/prog-checkver.c +++ b/test cases/linuxlike/1 pkg-config/prog-checkver.c @@ -2,7 +2,7 @@ #include <stdio.h> #include <string.h> -int main() { +int main(void) { void * something = deflate; if(strcmp(ZLIB_VERSION, FOUND_ZLIB) != 0) { printf("Meson found '%s' but zlib is '%s'\n", FOUND_ZLIB, ZLIB_VERSION); diff --git a/test cases/linuxlike/1 pkg-config/prog.c b/test cases/linuxlike/1 pkg-config/prog.c index e5774b7..eccc477 100644 --- a/test cases/linuxlike/1 pkg-config/prog.c +++ b/test cases/linuxlike/1 pkg-config/prog.c @@ -1,6 +1,6 @@ #include<zlib.h> -int main() { +int main(void) { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/12 subprojects in subprojects/main.c b/test cases/linuxlike/12 subprojects in subprojects/main.c index e4969c3..7452317 100644 --- a/test cases/linuxlike/12 subprojects in subprojects/main.c +++ b/test cases/linuxlike/12 subprojects in subprojects/main.c @@ -2,7 +2,7 @@ #include "a.h" #include "b.h" -int main() { +int main(void) { int life = a_fun() + b_fun(); printf("%d\n", life); return 0; diff --git a/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.c b/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.c index cd41a65..f7dd126 100644 --- a/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.c +++ b/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.c @@ -1,5 +1,5 @@ #include "c.h" -int a_fun() { +int a_fun(void) { return c_fun(); } diff --git a/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.h b/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.h index 8f1d49e..9de0deb 100644 --- a/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.h +++ b/test cases/linuxlike/12 subprojects in subprojects/subprojects/a/a.h @@ -1 +1 @@ -int a_fun(); +int a_fun(void); diff --git a/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.c b/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.c index 4824285..45c9348 100644 --- a/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.c +++ b/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.c @@ -2,7 +2,7 @@ #include "c.h" #endif -int b_fun(){ +int b_fun(void){ #if defined(WITH_C) return c_fun(); #else diff --git a/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.h b/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.h index eced786..47b84d4 100644 --- a/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.h +++ b/test cases/linuxlike/12 subprojects in subprojects/subprojects/b/b.h @@ -1 +1 @@ -int b_fun(); +int b_fun(void); diff --git a/test cases/linuxlike/12 subprojects in subprojects/subprojects/c/c.h b/test cases/linuxlike/12 subprojects in subprojects/subprojects/c/c.h index 2b15f60..b2e3f9b 100644 --- a/test cases/linuxlike/12 subprojects in subprojects/subprojects/c/c.h +++ b/test cases/linuxlike/12 subprojects in subprojects/subprojects/c/c.h @@ -1,3 +1,3 @@ -static int c_fun(){ +static int c_fun(void){ return 3; } diff --git a/test cases/linuxlike/13 cmake dependency/meson.build b/test cases/linuxlike/13 cmake dependency/meson.build index bae85aa..682d6d8 100644 --- a/test cases/linuxlike/13 cmake dependency/meson.build +++ b/test cases/linuxlike/13 cmake dependency/meson.build @@ -61,7 +61,7 @@ cc = meson.get_compiler('c') zlibdep = cc.find_library('z') code = '''#include<myinc.h> -int main() { +int main(void) { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/13 cmake dependency/prog-checkver.c b/test cases/linuxlike/13 cmake dependency/prog-checkver.c index 9c5f4f2..ea1ed32 100644 --- a/test cases/linuxlike/13 cmake dependency/prog-checkver.c +++ b/test cases/linuxlike/13 cmake dependency/prog-checkver.c @@ -2,7 +2,7 @@ #include <stdio.h> #include <string.h> -int main() { +int main(void) { void * something = deflate; if(strcmp(ZLIB_VERSION, FOUND_ZLIB) != 0) { printf("Meson found '%s' but zlib is '%s'\n", FOUND_ZLIB, ZLIB_VERSION); diff --git a/test cases/linuxlike/13 cmake dependency/prog.c b/test cases/linuxlike/13 cmake dependency/prog.c index e5774b7..eccc477 100644 --- a/test cases/linuxlike/13 cmake dependency/prog.c +++ b/test cases/linuxlike/13 cmake dependency/prog.c @@ -1,6 +1,6 @@ #include<zlib.h> -int main() { +int main(void) { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/13 cmake dependency/testFlagSet.c b/test cases/linuxlike/13 cmake dependency/testFlagSet.c index ec87f59..1f93ea3 100644 --- a/test cases/linuxlike/13 cmake dependency/testFlagSet.c +++ b/test cases/linuxlike/13 cmake dependency/testFlagSet.c @@ -9,7 +9,7 @@ #error "REQUIRED_MESON_FLAG2 not set" #endif -int main() { +int main(void) { printf("Hello World\n"); void * something = deflate; if(something != 0) diff --git a/test cases/linuxlike/14 static dynamic linkage/main.c b/test cases/linuxlike/14 static dynamic linkage/main.c index 628a200..09d1509 100644 --- a/test cases/linuxlike/14 static dynamic linkage/main.c +++ b/test cases/linuxlike/14 static dynamic linkage/main.c @@ -1,7 +1,7 @@ #include "stdio.h" #include "zlib.h" -int main() { +int main(void) { printf("%s\n", zlibVersion()); return 0; } diff --git a/test cases/linuxlike/2 external library/meson.build b/test cases/linuxlike/2 external library/meson.build index 43070f5..fbe661a 100644 --- a/test cases/linuxlike/2 external library/meson.build +++ b/test cases/linuxlike/2 external library/meson.build @@ -5,14 +5,14 @@ zlib = cc.find_library('z') # Verify that link testing works. linkcode = '''#include<zlib.h> -int main() { +int main(void) { void *ptr = (void*)(deflate); return ptr == 0; } ''' nolinkcode='''int nonexisting(); -int main() { +int main(void) { return nonexisting(); } ''' diff --git a/test cases/linuxlike/2 external library/prog.c b/test cases/linuxlike/2 external library/prog.c index e5774b7..eccc477 100644 --- a/test cases/linuxlike/2 external library/prog.c +++ b/test cases/linuxlike/2 external library/prog.c @@ -1,6 +1,6 @@ #include<zlib.h> -int main() { +int main(void) { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/3 linker script/bob.c b/test cases/linuxlike/3 linker script/bob.c index 7b3ed47..50e29c7 100644 --- a/test cases/linuxlike/3 linker script/bob.c +++ b/test cases/linuxlike/3 linker script/bob.c @@ -1,9 +1,9 @@ #include"bob.h" -int hiddenFunction() { +int hiddenFunction(void) { return 42; } -int bobMcBob() { +int bobMcBob(void) { return hiddenFunction(); } diff --git a/test cases/linuxlike/3 linker script/bob.h b/test cases/linuxlike/3 linker script/bob.h index b29331e..351e2fc 100644 --- a/test cases/linuxlike/3 linker script/bob.h +++ b/test cases/linuxlike/3 linker script/bob.h @@ -1,6 +1,6 @@ #ifndef BOB_H_ #define BOB_H_ -int bobMcBob(); +int bobMcBob(void); #endif diff --git a/test cases/linuxlike/3 linker script/prog.c b/test cases/linuxlike/3 linker script/prog.c index 2c9b01b..b010b15 100644 --- a/test cases/linuxlike/3 linker script/prog.c +++ b/test cases/linuxlike/3 linker script/prog.c @@ -1,5 +1,5 @@ #include"bob.h" -int main() { +int main(void) { return bobMcBob() != 42; } diff --git a/test cases/linuxlike/4 extdep static lib/lib.c b/test cases/linuxlike/4 extdep static lib/lib.c index 2f3b3c9..bbda9aa 100644 --- a/test cases/linuxlike/4 extdep static lib/lib.c +++ b/test cases/linuxlike/4 extdep static lib/lib.c @@ -1,6 +1,6 @@ #include<zlib.h> -int statlibfunc() { +int statlibfunc(void) { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/4 extdep static lib/prog.c b/test cases/linuxlike/4 extdep static lib/prog.c index c0268aa..0aeb827 100644 --- a/test cases/linuxlike/4 extdep static lib/prog.c +++ b/test cases/linuxlike/4 extdep static lib/prog.c @@ -1,5 +1,5 @@ -int statlibfunc(); +int statlibfunc(void); -int main() { +int main(void) { return statlibfunc(); } diff --git a/test cases/linuxlike/6 subdir include order/prog.c b/test cases/linuxlike/6 subdir include order/prog.c index 9c8af35..2d47a93 100644 --- a/test cases/linuxlike/6 subdir include order/prog.c +++ b/test cases/linuxlike/6 subdir include order/prog.c @@ -4,4 +4,4 @@ #error "Failed" #endif -int main() { return 0; } +int main(void) { return 0; } diff --git a/test cases/linuxlike/7 library versions/exe.orig.c b/test cases/linuxlike/7 library versions/exe.orig.c index 7074d2f..1e8e90e 100644 --- a/test cases/linuxlike/7 library versions/exe.orig.c +++ b/test cases/linuxlike/7 library versions/exe.orig.c @@ -1,6 +1,6 @@ int myFunc (void); -int main() +int main(void) { if (myFunc() == 55) return 0; diff --git a/test cases/linuxlike/7 library versions/lib.c b/test cases/linuxlike/7 library versions/lib.c index 67b6f4d..bd251d7 100644 --- a/test cases/linuxlike/7 library versions/lib.c +++ b/test cases/linuxlike/7 library versions/lib.c @@ -1,3 +1,3 @@ -int myFunc() { +int myFunc(void) { return 55; } diff --git a/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h b/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h index 681c7b8..6ae8462 100644 --- a/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h +++ b/test cases/linuxlike/8 subproject library install/subprojects/sublib/include/subdefs.h @@ -16,6 +16,6 @@ #endif #endif -int DLL_PUBLIC subfunc(); +int DLL_PUBLIC subfunc(void); #endif diff --git a/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c b/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c index c13326b..f71564f 100644 --- a/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c +++ b/test cases/linuxlike/8 subproject library install/subprojects/sublib/sublib.c @@ -1,5 +1,5 @@ #include<subdefs.h> -int DLL_PUBLIC subfunc() { +int DLL_PUBLIC subfunc(void) { return 42; } diff --git a/test cases/linuxlike/9 compiler checks with dependencies/meson.build b/test cases/linuxlike/9 compiler checks with dependencies/meson.build index 315971e..24a9ac0 100644 --- a/test cases/linuxlike/9 compiler checks with dependencies/meson.build +++ b/test cases/linuxlike/9 compiler checks with dependencies/meson.build @@ -10,7 +10,7 @@ if glib.found() assert (cc.has_member('GError', 'message', prefix : '#include <glib.h>', dependencies : glib), 'GError::message not found') assert (cc.has_header_symbol('glib.h', 'gint32', dependencies : glib), 'gint32 symbol not found') linkcode = '''#include <glib.h> -int main () { +int main (void) { GError *error = g_error_new_literal (0, 0, NULL); return error == NULL; } @@ -21,7 +21,7 @@ endif zlib = cc.find_library ('z') if zlib.found() linkcode = '''#include<zlib.h> -int main() { +int main(void) { void *ptr = (void*)(deflate); return ptr == 0; } @@ -34,5 +34,3 @@ assert(cc.has_function('pthread_create', dependencies : dependency('threads'), prefix : '#include <pthread.h>'), 'Could not detect pthread_create with a thread dependency.') - - diff --git a/test cases/objc/4 c++ project objc subproject/master.cpp b/test cases/objc/4 c++ project objc subproject/master.cpp index 2f351d1..cd08fb1 100644 --- a/test cases/objc/4 c++ project objc subproject/master.cpp +++ b/test cases/objc/4 c++ project objc subproject/master.cpp @@ -4,7 +4,7 @@ extern "C" int foo(); -int main() { +int main(void) { std::cout << "Starting\n"; std::cout << foo() << "\n"; return 0; diff --git a/test cases/rust/4 polyglot/prog.c b/test cases/rust/4 polyglot/prog.c index 18f2c36..dbbd880 100644 --- a/test cases/rust/4 polyglot/prog.c +++ b/test cases/rust/4 polyglot/prog.c @@ -2,7 +2,7 @@ void f(); -int main() { +int main(void) { printf("Hello from C!\n"); f(); } diff --git a/test cases/rust/5 polyglot static/prog.c b/test cases/rust/5 polyglot static/prog.c index 18f2c36..dbbd880 100644 --- a/test cases/rust/5 polyglot static/prog.c +++ b/test cases/rust/5 polyglot static/prog.c @@ -2,7 +2,7 @@ void f(); -int main() { +int main(void) { printf("Hello from C!\n"); f(); } diff --git a/test cases/unit/14 testsetup selection/main.c b/test cases/unit/14 testsetup selection/main.c index 33c14ce..9b6bdc2 100644 --- a/test cases/unit/14 testsetup selection/main.c +++ b/test cases/unit/14 testsetup selection/main.c @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 0; } diff --git a/test cases/unit/14 testsetup selection/subprojects/bar/bar.c b/test cases/unit/14 testsetup selection/subprojects/bar/bar.c index 33c14ce..9b6bdc2 100644 --- a/test cases/unit/14 testsetup selection/subprojects/bar/bar.c +++ b/test cases/unit/14 testsetup selection/subprojects/bar/bar.c @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 0; } diff --git a/test cases/unit/14 testsetup selection/subprojects/foo/foo.c b/test cases/unit/14 testsetup selection/subprojects/foo/foo.c index 33c14ce..9b6bdc2 100644 --- a/test cases/unit/14 testsetup selection/subprojects/foo/foo.c +++ b/test cases/unit/14 testsetup selection/subprojects/foo/foo.c @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 0; } diff --git a/test cases/unit/25 non-permitted kwargs/meson.build b/test cases/unit/25 non-permitted kwargs/meson.build index 9f7dc1f..287acfd 100644 --- a/test cases/unit/25 non-permitted kwargs/meson.build +++ b/test cases/unit/25 non-permitted kwargs/meson.build @@ -1,5 +1,5 @@ project('non-permitted kwargs', 'c') cc = meson.get_compiler('c') cc.has_header_symbol('stdio.h', 'printf', prefixxx: '#define XXX') -cc.links('int main(){}', argsxx: '') +cc.links('int main(void){}', argsxx: '') cc.get_id(invalidxx: '') diff --git a/test cases/unit/29 guessed linker dependencies/exe/app.c b/test cases/unit/29 guessed linker dependencies/exe/app.c index 1031a42..29c8d9c 100644 --- a/test cases/unit/29 guessed linker dependencies/exe/app.c +++ b/test cases/unit/29 guessed linker dependencies/exe/app.c @@ -1,6 +1,6 @@ void liba_func(); -int main() { +int main(void) { liba_func(); return 0; } diff --git a/test cases/unit/32 pkgconfig use libraries/app/app.c b/test cases/unit/32 pkgconfig use libraries/app/app.c index b271a9e..7b8d8fa 100644 --- a/test cases/unit/32 pkgconfig use libraries/app/app.c +++ b/test cases/unit/32 pkgconfig use libraries/app/app.c @@ -1,6 +1,6 @@ void libb_func(); -int main() { +int main(void) { libb_func(); return 0; } diff --git a/test cases/unit/4 suite selection/failing_test.c b/test cases/unit/4 suite selection/failing_test.c index bf00907..393344d 100644 --- a/test cases/unit/4 suite selection/failing_test.c +++ b/test cases/unit/4 suite selection/failing_test.c @@ -1 +1 @@ -int main() { return -1 ; } +int main(void) { return -1 ; } diff --git a/test cases/unit/4 suite selection/subprojects/subprjfail/failing_test.c b/test cases/unit/4 suite selection/subprojects/subprjfail/failing_test.c index bf00907..393344d 100644 --- a/test cases/unit/4 suite selection/subprojects/subprjfail/failing_test.c +++ b/test cases/unit/4 suite selection/subprojects/subprjfail/failing_test.c @@ -1 +1 @@ -int main() { return -1 ; } +int main(void) { return -1 ; } diff --git a/test cases/unit/4 suite selection/subprojects/subprjmix/failing_test.c b/test cases/unit/4 suite selection/subprojects/subprjmix/failing_test.c index bf00907..393344d 100644 --- a/test cases/unit/4 suite selection/subprojects/subprjmix/failing_test.c +++ b/test cases/unit/4 suite selection/subprojects/subprjmix/failing_test.c @@ -1 +1 @@ -int main() { return -1 ; } +int main(void) { return -1 ; } diff --git a/test cases/unit/4 suite selection/subprojects/subprjmix/successful_test.c b/test cases/unit/4 suite selection/subprojects/subprjmix/successful_test.c index 29c0525..8842fc1 100644 --- a/test cases/unit/4 suite selection/subprojects/subprjmix/successful_test.c +++ b/test cases/unit/4 suite selection/subprojects/subprjmix/successful_test.c @@ -1 +1 @@ -int main() { return 0 ; } +int main(void) { return 0 ; } diff --git a/test cases/unit/4 suite selection/subprojects/subprjsucc/successful_test.c b/test cases/unit/4 suite selection/subprojects/subprjsucc/successful_test.c index 29c0525..8842fc1 100644 --- a/test cases/unit/4 suite selection/subprojects/subprjsucc/successful_test.c +++ b/test cases/unit/4 suite selection/subprojects/subprjsucc/successful_test.c @@ -1 +1 @@ -int main() { return 0 ; } +int main(void) { return 0 ; } diff --git a/test cases/unit/4 suite selection/successful_test.c b/test cases/unit/4 suite selection/successful_test.c index 29c0525..8842fc1 100644 --- a/test cases/unit/4 suite selection/successful_test.c +++ b/test cases/unit/4 suite selection/successful_test.c @@ -1 +1 @@ -int main() { return 0 ; } +int main(void) { return 0 ; } diff --git a/test cases/unit/45 vscpp17/main.cpp b/test cases/unit/45 vscpp17/main.cpp index 36e4156..bfe2470 100644 --- a/test cases/unit/45 vscpp17/main.cpp +++ b/test cases/unit/45 vscpp17/main.cpp @@ -1,7 +1,7 @@ -[[nodiscard]] int foo() { +[[nodiscard]] int foo(void) { return 0; } -int main() { +int main(void) { return foo(); } diff --git a/test cases/unit/57 introspection/t1.cpp b/test cases/unit/57 introspection/t1.cpp index 2bcaab8..901e3f1 100644 --- a/test cases/unit/57 introspection/t1.cpp +++ b/test cases/unit/57 introspection/t1.cpp @@ -1,6 +1,6 @@ #include "sharedlib/shared.hpp" -int main() { +int main(void) { SharedClass cl1; if(cl1.getNumber() != 42) { return 1; diff --git a/test cases/unit/57 introspection/t2.cpp b/test cases/unit/57 introspection/t2.cpp index fee5097..8323f46 100644 --- a/test cases/unit/57 introspection/t2.cpp +++ b/test cases/unit/57 introspection/t2.cpp @@ -1,6 +1,6 @@ #include "staticlib/static.h" -int main() { +int main(void) { if(add_numbers(1, 2) != 3) { return 1; } diff --git a/test cases/unit/57 introspection/t3.cpp b/test cases/unit/57 introspection/t3.cpp index 8a906e0..dd518e8 100644 --- a/test cases/unit/57 introspection/t3.cpp +++ b/test cases/unit/57 introspection/t3.cpp @@ -1,7 +1,7 @@ #include "sharedlib/shared.hpp" #include "staticlib/static.h" -int main() { +int main(void) { for(int i = 0; i < 1000; add_numbers(i, 1)) { SharedClass cl1; if(cl1.getNumber() != 42) { diff --git a/test cases/unit/59 introspect buildoptions/main.c b/test cases/unit/59 introspect buildoptions/main.c index ef99ae6..709730f 100644 --- a/test cases/unit/59 introspect buildoptions/main.c +++ b/test cases/unit/59 introspect buildoptions/main.c @@ -1,6 +1,6 @@ #include <stdio.h> -int main() { +int main(void) { printf("Hello World"); return 0; } diff --git a/test cases/unit/68 static archive stripping/app/appA.c b/test cases/unit/68 static archive stripping/app/appA.c index 9c14a02..e44b54a 100644 --- a/test cases/unit/68 static archive stripping/app/appA.c +++ b/test cases/unit/68 static archive stripping/app/appA.c @@ -1,4 +1,4 @@ #include <stdio.h> #include <libA.h> -int main() { printf("The answer is: %d\n", libA_func()); } +int main(void) { printf("The answer is: %d\n", libA_func()); } diff --git a/test cases/unit/68 static archive stripping/app/appB.c b/test cases/unit/68 static archive stripping/app/appB.c index 05b4a2a..0ec0b62 100644 --- a/test cases/unit/68 static archive stripping/app/appB.c +++ b/test cases/unit/68 static archive stripping/app/appB.c @@ -1,4 +1,4 @@ #include <stdio.h> #include <libB.h> -int main() { printf("The answer is: %d\n", libB_func()); } +int main(void) { printf("The answer is: %d\n", libB_func()); } diff --git a/test cases/warning/1 version for string div/a/b.c b/test cases/warning/1 version for string div/a/b.c index 5047a34..74de8a8 100644 --- a/test cases/warning/1 version for string div/a/b.c +++ b/test cases/warning/1 version for string div/a/b.c @@ -1,3 +1,3 @@ -int main() +int main(void) { } diff --git a/test cases/wasm/1 basic/hello.cpp b/test cases/wasm/1 basic/hello.cpp index 6ce13da..119dc8b 100644 --- a/test cases/wasm/1 basic/hello.cpp +++ b/test cases/wasm/1 basic/hello.cpp @@ -1,6 +1,6 @@ #include<iostream> -int main() { +int main(void) { std::cout << "Hello World" << std::endl; return 0; } diff --git a/test cases/windows/1 basic/prog.c b/test cases/windows/1 basic/prog.c index b94a38f..f400e12 100644 --- a/test cases/windows/1 basic/prog.c +++ b/test cases/windows/1 basic/prog.c @@ -1,5 +1,5 @@ #include <windows.h> -int main() { +int main(void) { return 0; } diff --git a/test cases/windows/10 vs module defs generated custom target/prog.c b/test cases/windows/10 vs module defs generated custom target/prog.c index 2567760..51f7805 100644 --- a/test cases/windows/10 vs module defs generated custom target/prog.c +++ b/test cases/windows/10 vs module defs generated custom target/prog.c @@ -1,5 +1,5 @@ int somedllfunc(); -int main() { +int main(void) { return somedllfunc() == 42 ? 0 : 1; } diff --git a/test cases/windows/16 gui app/console_prog.c b/test cases/windows/16 gui app/console_prog.c index 33c14ce..9b6bdc2 100644 --- a/test cases/windows/16 gui app/console_prog.c +++ b/test cases/windows/16 gui app/console_prog.c @@ -1,3 +1,3 @@ -int main() { +int main(void) { return 0; } diff --git a/test cases/windows/6 vs module defs/prog.c b/test cases/windows/6 vs module defs/prog.c index 2567760..51f7805 100644 --- a/test cases/windows/6 vs module defs/prog.c +++ b/test cases/windows/6 vs module defs/prog.c @@ -1,5 +1,5 @@ int somedllfunc(); -int main() { +int main(void) { return somedllfunc() == 42 ? 0 : 1; } diff --git a/test cases/windows/7 dll versioning/exe.orig.c b/test cases/windows/7 dll versioning/exe.orig.c index 7074d2f..1e8e90e 100644 --- a/test cases/windows/7 dll versioning/exe.orig.c +++ b/test cases/windows/7 dll versioning/exe.orig.c @@ -1,6 +1,6 @@ int myFunc (void); -int main() +int main(void) { if (myFunc() == 55) return 0; diff --git a/test cases/windows/9 vs module defs generated/prog.c b/test cases/windows/9 vs module defs generated/prog.c index 2567760..51f7805 100644 --- a/test cases/windows/9 vs module defs generated/prog.c +++ b/test cases/windows/9 vs module defs generated/prog.c @@ -1,5 +1,5 @@ int somedllfunc(); -int main() { +int main(void) { return somedllfunc() == 42 ? 0 : 1; } |