diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-09-05 14:41:33 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-11-17 13:24:42 +0200 |
commit | 1baa1c92220d23a91337e8aa1e174c66f7fd0531 (patch) | |
tree | e46796919bce6bbc5408bbca0b23d5bf7d3d2fc0 /test cases | |
parent | c6f93b6bf67500c963cdaa33b0500ea1a15232b0 (diff) | |
download | meson-1baa1c92220d23a91337e8aa1e174c66f7fd0531.zip meson-1baa1c92220d23a91337e8aa1e174c66f7fd0531.tar.gz meson-1baa1c92220d23a91337e8aa1e174c66f7fd0531.tar.bz2 |
use '-Werror=unused-parameter' for gcc/clang on project tests and -fimplicit-none on fortran
Fortran: check for undeclared variables by forcing implicit none everywhere
C/C++: check for unused parameters and return types
removed unused variables from test cases
ci: do missing return and unused arg check with Github Actions
Diffstat (limited to 'test cases')
184 files changed, 197 insertions, 200 deletions
diff --git a/test cases/common/1 trivial/trivial.c b/test cases/common/1 trivial/trivial.c index 24ac454..38b58cc 100644 --- a/test cases/common/1 trivial/trivial.c +++ b/test cases/common/1 trivial/trivial.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("Trivial test is working.\n"); return 0; } diff --git a/test cases/common/100 stringdef/stringdef.c b/test cases/common/100 stringdef/stringdef.c index 69ea656..f1f1ca4 100644 --- a/test cases/common/100 stringdef/stringdef.c +++ b/test cases/common/100 stringdef/stringdef.c @@ -1,7 +1,7 @@ #include<stdio.h> #include<string.h> -int main(int argc, char **argv) { +int main() { if(strcmp(FOO, "bar")) { printf("FOO is misquoted: %s\n", FOO); return 1; diff --git a/test cases/common/103 postconf/prog.c b/test cases/common/103 postconf/prog.c index 1e5d4cb..9315f86 100644 --- a/test cases/common/103 postconf/prog.c +++ b/test cases/common/103 postconf/prog.c @@ -1,5 +1,5 @@ #include"generated.h" -int main(int argc, char **argv) { +int main() { return THE_NUMBER != 9; } diff --git a/test cases/common/104 postconf with args/prog.c b/test cases/common/104 postconf with args/prog.c index 0e63a8c..6458543 100644 --- a/test cases/common/104 postconf with args/prog.c +++ b/test cases/common/104 postconf with args/prog.c @@ -1,5 +1,5 @@ #include"generated.h" -int main(int argc, char **argv) { +int main() { return THE_NUMBER != 9 || THE_ARG1 != 5 || THE_ARG2 != 33; } diff --git a/test cases/common/106 extract same name/main.c b/test cases/common/106 extract same name/main.c index dc57dd5..79e70a2 100644 --- a/test cases/common/106 extract same name/main.c +++ b/test cases/common/106 extract same name/main.c @@ -1,6 +1,6 @@ int func1(); int func2(); -int main(int argc, char **argv) { +int main() { return !(func1() == 23 && func2() == 42); } diff --git a/test cases/common/109 generatorcustom/main.c b/test cases/common/109 generatorcustom/main.c index 04abcf6..23f894f 100644 --- a/test cases/common/109 generatorcustom/main.c +++ b/test cases/common/109 generatorcustom/main.c @@ -2,6 +2,6 @@ #include"alltogether.h" -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/11 subdir/subdir/prog.c b/test cases/common/11 subdir/subdir/prog.c index 0314ff1..76e8197 100644 --- a/test cases/common/11 subdir/subdir/prog.c +++ b/test cases/common/11 subdir/subdir/prog.c @@ -1 +1 @@ -int main(int argc, char **argv) { return 0; } +int main() { return 0; } diff --git a/test cases/common/111 spaces backslash/comparer-end-notstring.c b/test cases/common/111 spaces backslash/comparer-end-notstring.c index 65bf8bc..a50ad6d 100644 --- a/test cases/common/111 spaces backslash/comparer-end-notstring.c +++ b/test cases/common/111 spaces backslash/comparer-end-notstring.c @@ -10,7 +10,7 @@ #define COMPARE_WITH "foo\\bar\\" /* This is the literal `foo\bar\` */ -int main(int argc, char **argv) { +int main() { if(strcmp(QUOTE(DEF_WITH_BACKSLASH), COMPARE_WITH)) { printf("Arg string is quoted incorrectly: %s instead of %s\n", QUOTE(DEF_WITH_BACKSLASH), COMPARE_WITH); diff --git a/test cases/common/111 spaces backslash/comparer-end.c b/test cases/common/111 spaces backslash/comparer-end.c index fef25a5..60c6bdb 100644 --- a/test cases/common/111 spaces backslash/comparer-end.c +++ b/test cases/common/111 spaces backslash/comparer-end.c @@ -6,7 +6,7 @@ #define COMPARE_WITH "foo\\bar\\" /* This is `foo\bar\` */ -int main (int argc, char **argv) { +int main () { if (strcmp (DEF_WITH_BACKSLASH, COMPARE_WITH)) { printf ("Arg string is quoted incorrectly: %s vs %s\n", DEF_WITH_BACKSLASH, COMPARE_WITH); diff --git a/test cases/common/111 spaces backslash/comparer.c b/test cases/common/111 spaces backslash/comparer.c index 937cb47..e705ff3 100644 --- a/test cases/common/111 spaces backslash/comparer.c +++ b/test cases/common/111 spaces backslash/comparer.c @@ -6,7 +6,7 @@ #define COMPARE_WITH "foo\\bar" /* This is the literal `foo\bar` */ -int main (int argc, char **argv) { +int main () { if (strcmp (DEF_WITH_BACKSLASH, COMPARE_WITH)) { printf ("Arg string is quoted incorrectly: %s instead of %s\n", DEF_WITH_BACKSLASH, COMPARE_WITH); diff --git a/test cases/common/114 allgenerate/foobar.cpp.in b/test cases/common/114 allgenerate/foobar.cpp.in index c64f3b5..7cec281 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 argc, char **argv) { +int main() { printf("I am a program.\n"); return 0; } diff --git a/test cases/common/119 subproject project arguments/exe.c b/test cases/common/119 subproject project arguments/exe.c index d6440f0..b338846 100644 --- a/test cases/common/119 subproject project arguments/exe.c +++ b/test cases/common/119 subproject project arguments/exe.c @@ -22,6 +22,6 @@ #error #endif -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/119 subproject project arguments/exe.cpp b/test cases/common/119 subproject project arguments/exe.cpp index 8471c6f..b739df7 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 argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/119 subproject project arguments/subprojects/subexe/subexe.c b/test cases/common/119 subproject project arguments/subprojects/subexe/subexe.c index f748afc..62cc965 100644 --- a/test cases/common/119 subproject project arguments/subprojects/subexe/subexe.c +++ b/test cases/common/119 subproject project arguments/subprojects/subexe/subexe.c @@ -22,6 +22,6 @@ #error #endif -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/120 test skip/test_skip.c b/test cases/common/120 test skip/test_skip.c index db26681..24ea97b 100644 --- a/test cases/common/120 test skip/test_skip.c +++ b/test cases/common/120 test skip/test_skip.c @@ -1,3 +1,3 @@ -int main(int argc, char *argv[]) { +int main() { return 77; } diff --git a/test cases/common/121 shared module/prog.c b/test cases/common/121 shared module/prog.c index 8b56d93..4741185 100644 --- a/test cases/common/121 shared module/prog.c +++ b/test cases/common/121 shared module/prog.c @@ -21,13 +21,13 @@ win32_get_last_error (void) return msg; } -int -main (int argc, char **argv) +int main(int argc, char **argv) { HINSTANCE handle; fptr importedfunc; int expected, actual; int ret = 1; + if(argc==0) {}; handle = LoadLibraryA (argv[1]); if (!handle) { @@ -68,6 +68,7 @@ int main(int argc, char **argv) { int expected, actual; char *error; int ret = 1; + if(argc==0) {}; dlerror(); dl = dlopen(argv[1], RTLD_LAZY); diff --git a/test cases/common/122 llvm ir and assembly/main.c b/test cases/common/122 llvm ir and assembly/main.c index 97fe723..887c64a 100644 --- a/test cases/common/122 llvm ir and assembly/main.c +++ b/test cases/common/122 llvm ir and assembly/main.c @@ -2,8 +2,7 @@ unsigned square_unsigned (unsigned a); -int -main (int argc, char * argv[]) +int main () { unsigned int ret = square_unsigned (2); if (ret != 4) { 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 f2c7de3..07eaab8 100644 --- a/test cases/common/122 llvm ir and assembly/main.cpp +++ b/test cases/common/122 llvm ir and assembly/main.cpp @@ -4,8 +4,7 @@ extern "C" { unsigned square_unsigned (unsigned a); } -int -main (int argc, char * argv[]) +int main () { 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 d2928c0..7f2ead1 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 argc, char **argv) { +int main() { 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/prog.c b/test cases/common/124 extract all shared library/prog.c index 57a4c64..48e7680 100644 --- a/test cases/common/124 extract all shared library/prog.c +++ b/test cases/common/124 extract all shared library/prog.c @@ -1,7 +1,7 @@ #include"extractor.h" #include<stdio.h> -int main(int argc, char **argv) { +int main() { if((1+2+3+4) != (func1() + func2() + func3() + func4())) { printf("Arithmetic is fail.\n"); return 1; diff --git a/test cases/common/125 object only target/prog.c b/test cases/common/125 object only target/prog.c index 60459d6..09f2790 100644 --- a/test cases/common/125 object only target/prog.c +++ b/test cases/common/125 object only target/prog.c @@ -2,6 +2,6 @@ int func1_in_obj(); int func2_in_obj(); int func3_in_obj(); -int main(int argc, char **argv) { +int main() { return func1_in_obj() + func2_in_obj() + func3_in_obj(); } diff --git a/test cases/common/126 no buildincdir/prog.c b/test cases/common/126 no buildincdir/prog.c index 800f0d6..7e9d194 100644 --- a/test cases/common/126 no buildincdir/prog.c +++ b/test cases/common/126 no buildincdir/prog.c @@ -1,5 +1,5 @@ #include"header.h" -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/128 dependency file generation/main .c b/test cases/common/128 dependency file generation/main .c index 0fb4389..4cce7f6 100644 --- a/test cases/common/128 dependency file generation/main .c +++ b/test cases/common/128 dependency file generation/main .c @@ -1,3 +1,3 @@ -int main(int argc, char *argv[]) { +int main() { return 0; } diff --git a/test cases/common/129 configure file in generator/src/main.c b/test cases/common/129 configure file in generator/src/main.c index 54f4f57..3ee83e6 100644 --- a/test cases/common/129 configure file in generator/src/main.c +++ b/test cases/common/129 configure file in generator/src/main.c @@ -12,6 +12,6 @@ #error Source RESULT is not defined correctly #endif -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/13 pch/c/prog.c b/test cases/common/13 pch/c/prog.c index 0ce3d0a..ee6df21 100644 --- a/test cases/common/13 pch/c/prog.c +++ b/test cases/common/13 pch/c/prog.c @@ -4,7 +4,7 @@ void func() { fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); } -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/13 pch/cpp/prog.cc b/test cases/common/13 pch/cpp/prog.cc index ea258c6..7fa6253 100644 --- a/test cases/common/13 pch/cpp/prog.cc +++ b/test cases/common/13 pch/cpp/prog.cc @@ -5,7 +5,7 @@ void func() { << std::endl; } -int main(int argc, char **argv) { +int main() { func(); return 0; } diff --git a/test cases/common/13 pch/generated/prog.c b/test cases/common/13 pch/generated/prog.c index 9b2e2ef..e1601c9 100644 --- a/test cases/common/13 pch/generated/prog.c +++ b/test cases/common/13 pch/generated/prog.c @@ -1,6 +1,6 @@ // No includes here, they need to come from the PCH -int main(int argc, char **argv) { +int main() { return FOO + BAR; } diff --git a/test cases/common/13 pch/mixed/main.cc b/test cases/common/13 pch/mixed/main.cc index 44d049e..fb8932e 100644 --- a/test cases/common/13 pch/mixed/main.cc +++ b/test cases/common/13 pch/mixed/main.cc @@ -5,6 +5,6 @@ void func() { << std::endl; } -int main(int argc, char **argv) { +int main() { return cfunc(); } diff --git a/test cases/common/13 pch/userDefined/prog.c b/test cases/common/13 pch/userDefined/prog.c index eb068d9..c7b713a 100644 --- a/test cases/common/13 pch/userDefined/prog.c +++ b/test cases/common/13 pch/userDefined/prog.c @@ -1,6 +1,6 @@ // No includes here, they need to come from the PCH -int main(int argc, char **argv) { +int main() { // Method is implemented in pch.c. // This makes sure that we can properly handle user defined // pch implementation files and not only auto-generated ones. diff --git a/test cases/common/13 pch/withIncludeDirectories/prog.c b/test cases/common/13 pch/withIncludeDirectories/prog.c index 0ce3d0a..ee6df21 100644 --- a/test cases/common/13 pch/withIncludeDirectories/prog.c +++ b/test cases/common/13 pch/withIncludeDirectories/prog.c @@ -4,7 +4,7 @@ void func() { fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); } -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/130 generated llvm ir/main.c b/test cases/common/130 generated llvm ir/main.c index 97fe723..887c64a 100644 --- a/test cases/common/130 generated llvm ir/main.c +++ b/test cases/common/130 generated llvm ir/main.c @@ -2,8 +2,7 @@ unsigned square_unsigned (unsigned a); -int -main (int argc, char * argv[]) +int main () { unsigned int ret = square_unsigned (2); if (ret != 4) { diff --git a/test cases/common/131 generated assembly/main.c b/test cases/common/131 generated assembly/main.c index b669cba..708eeb5 100644 --- a/test cases/common/131 generated assembly/main.c +++ b/test cases/common/131 generated assembly/main.c @@ -5,8 +5,7 @@ #endif unsigned square_unsigned (unsigned a); -int -main (int argc, char * argv[]) +int main () { unsigned int ret = square_unsigned (2); if (ret != 4) { diff --git a/test cases/common/132 build by default targets in tests/main.c b/test cases/common/132 build by default targets in tests/main.c index 63a62a1..49e3a51 100644 --- a/test cases/common/132 build by default targets in tests/main.c +++ b/test cases/common/132 build by default targets in tests/main.c @@ -1,3 +1,3 @@ -int main (int argc, char *argv[]) { +int main () { return 0; } diff --git a/test cases/common/133 build by default/foo.c b/test cases/common/133 build by default/foo.c index ca97916..0e6f7a0 100644 --- a/test cases/common/133 build by default/foo.c +++ b/test cases/common/133 build by default/foo.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("Existentialism.\n"); return 0; } diff --git a/test cases/common/134 include order/ordertest.c b/test cases/common/134 include order/ordertest.c index 0d9173f..a5896b4 100644 --- a/test cases/common/134 include order/ordertest.c +++ b/test cases/common/134 include order/ordertest.c @@ -4,8 +4,7 @@ #error "Should have picked up hdr.h from inc1/hdr.h" #endif -int -main (int c, char ** argv) +int main () { return 0; } diff --git a/test cases/common/134 include order/sub4/main.c b/test cases/common/134 include order/sub4/main.c index 0b25eed..77417dd 100644 --- a/test cases/common/134 include order/sub4/main.c +++ b/test cases/common/134 include order/sub4/main.c @@ -1,7 +1,7 @@ /* Use the <> include notation to force searching in include directories */ #include <main.h> -int main(int argc, char *argv[]) { +int main() { if (somefunc() == 1984) return 0; return 1; diff --git a/test cases/common/135 override options/four.c b/test cases/common/135 override options/four.c index 54f8491..2ab126d 100644 --- a/test cases/common/135 override options/four.c +++ b/test cases/common/135 override options/four.c @@ -4,6 +4,6 @@ static int duplicate_func() { return -4; } -int main(int argc, char **argv) { +int main() { return duplicate_func() + func(); } diff --git a/test cases/common/135 override options/two.c b/test cases/common/135 override options/two.c index 04b1d3f..f3082a6 100644 --- a/test cases/common/135 override options/two.c +++ b/test cases/common/135 override options/two.c @@ -1,6 +1,6 @@ /* * Requires a Unity build. Otherwise hidden_func is not specified. */ -int main(int argc, char **argv) { +int main() { return hidden_func(); } diff --git a/test cases/common/137 c cpp and asm/main.c b/test cases/common/137 c cpp and asm/main.c index 8976723..66985ed 100644 --- a/test cases/common/137 c cpp and asm/main.c +++ b/test cases/common/137 c cpp and asm/main.c @@ -2,7 +2,7 @@ int get_retval(void); -int main(int argc, char **argv) { +int main() { printf("C seems to be working.\n"); return get_retval(); } 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 c089870..2abd084 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 argc, char **argv) { +int main() { 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 ff1ad55..e78a98c 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 argc, char **argv) { +int main() { 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/progdir/prog.c b/test cases/common/139 custom target object output/progdir/prog.c index c1ece33..d2648bb 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,5 +1,5 @@ int func1_in_obj(); -int main(int argc, char **argv) { +int main() { return func1_in_obj(); } diff --git a/test cases/common/14 configure file/dumpprog.c b/test cases/common/14 configure file/dumpprog.c index 39a215e..80410f2 100644 --- a/test cases/common/14 configure file/dumpprog.c +++ b/test cases/common/14 configure file/dumpprog.c @@ -15,7 +15,7 @@ #define stringify(s) str(s) #define str(s) #s -int main(int argc, char **argv) { +int main() { #if !(SHOULD_BE_UNQUOTED_STRING == string) printf("String token (unquoted) defined wrong.\n"); return 1; diff --git a/test cases/common/14 configure file/prog.c b/test cases/common/14 configure file/prog.c index 89a718e..332e3bb 100644 --- a/test cases/common/14 configure file/prog.c +++ b/test cases/common/14 configure file/prog.c @@ -8,7 +8,7 @@ #error "FAIL!" #endif -int main(int argc, char **argv) { +int main() { #ifndef BE_TRUE return 1; #else diff --git a/test cases/common/14 configure file/prog2.c b/test cases/common/14 configure file/prog2.c index a88c70f..2aff40c 100644 --- a/test cases/common/14 configure file/prog2.c +++ b/test cases/common/14 configure file/prog2.c @@ -1,5 +1,5 @@ #include<config2.h> -int main(int argc, char **argv) { +int main() { return ZERO_RESULT; } diff --git a/test cases/common/14 configure file/prog4.c b/test cases/common/14 configure file/prog4.c index 92dc7cb..7ee4f49 100644 --- a/test cases/common/14 configure file/prog4.c +++ b/test cases/common/14 configure file/prog4.c @@ -1,6 +1,6 @@ #include <config4a.h> #include <config4b.h> -int main(int argc, char **argv) { +int main() { return RESULTA + RESULTB; } diff --git a/test cases/common/14 configure file/prog5.c b/test cases/common/14 configure file/prog5.c index 42c08f9..f387530 100644 --- a/test cases/common/14 configure file/prog5.c +++ b/test cases/common/14 configure file/prog5.c @@ -1,6 +1,6 @@ #include <string.h> #include <config5.h> -int main(int argc, char **argv) { +int main() { return strcmp(MESSAGE, "@var2@"); } diff --git a/test cases/common/14 configure file/prog6.c b/test cases/common/14 configure file/prog6.c index 7412404..eecd63e 100644 --- a/test cases/common/14 configure file/prog6.c +++ b/test cases/common/14 configure file/prog6.c @@ -1,7 +1,7 @@ #include <string.h> #include <config6.h> -int main(int argc, char **argv) { +int main() { return strcmp(MESSAGE1, "foo") || strcmp(MESSAGE2, "@var1@") || strcmp(MESSAGE3, "\\foo") diff --git a/test cases/common/14 configure file/prog7.c b/test cases/common/14 configure file/prog7.c index 0bb7d13..a0e6f75 100644 --- a/test cases/common/14 configure file/prog7.c +++ b/test cases/common/14 configure file/prog7.c @@ -1,7 +1,7 @@ #include <string.h> #include <config7.h> -int main(int argc, char **argv) { +int main() { return strcmp(MESSAGE1, "foo") || strcmp(MESSAGE2, "${var1}") || strcmp(MESSAGE3, "\\foo") diff --git a/test cases/common/14 configure file/prog9.c b/test cases/common/14 configure file/prog9.c index 28c7354..7180a26 100644 --- a/test cases/common/14 configure file/prog9.c +++ b/test cases/common/14 configure file/prog9.c @@ -10,7 +10,7 @@ #error "Should be defined" #endif -int main(int argc, char **argv) { +int main() { return strcmp(A_STRING, "foo") || strcmp(B_STRING, "foo") || A_INT != 42 diff --git a/test cases/common/141 whole archive/prog.c b/test cases/common/141 whole archive/prog.c index 9111ad4..c6eb045 100644 --- a/test cases/common/141 whole archive/prog.c +++ b/test cases/common/141 whole archive/prog.c @@ -1,5 +1,5 @@ #include<mylib.h> -int main(int argc, char **argv) { +int main() { return func1() - func2(); } 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 8155f35..f5bc0b4 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 argc, char *argv[]) { +int main() { int val; val = get_@LIBTYPE@@DEPENDENCY@dep_value (); diff --git a/test cases/common/149 recursive linking/circular/main.c b/test cases/common/149 recursive linking/circular/main.c index 5f797a5..a419333 100644 --- a/test cases/common/149 recursive linking/circular/main.c +++ b/test cases/common/149 recursive linking/circular/main.c @@ -6,7 +6,7 @@ int get_st1_value (void); int get_st2_value (void); int get_st3_value (void); -int main(int argc, char *argv[]) { +int main() { int val; val = get_st1_value (); diff --git a/test cases/common/149 recursive linking/edge-cases/shstmain.c b/test cases/common/149 recursive linking/edge-cases/shstmain.c index b44c55f..6598c72 100644 --- a/test cases/common/149 recursive linking/edge-cases/shstmain.c +++ b/test cases/common/149 recursive linking/edge-cases/shstmain.c @@ -4,7 +4,7 @@ int get_stshdep_value (void); -int main(int argc, char *argv[]) { +int main() { int val; val = get_stshdep_value (); diff --git a/test cases/common/149 recursive linking/edge-cases/stomain.c b/test cases/common/149 recursive linking/edge-cases/stomain.c index 90208a7..544ece9 100644 --- a/test cases/common/149 recursive linking/edge-cases/stomain.c +++ b/test cases/common/149 recursive linking/edge-cases/stomain.c @@ -4,7 +4,7 @@ int get_stodep_value (void); -int main(int argc, char *argv[]) { +int main() { int val; val = get_stodep_value (); diff --git a/test cases/common/149 recursive linking/main.c b/test cases/common/149 recursive linking/main.c index 0851611..2ddcb88 100644 --- a/test cases/common/149 recursive linking/main.c +++ b/test cases/common/149 recursive linking/main.c @@ -9,7 +9,7 @@ SYMBOL_IMPORT int get_shnodep_value (void); SYMBOL_IMPORT int get_shshdep_value (void); SYMBOL_IMPORT int get_shstdep_value (void); -int main(int argc, char *argv[]) { +int main() { int val; val = get_shnodep_value (); diff --git a/test cases/common/15 if/prog.c b/test cases/common/15 if/prog.c index 0314ff1..76e8197 100644 --- a/test cases/common/15 if/prog.c +++ b/test cases/common/15 if/prog.c @@ -1 +1 @@ -int main(int argc, char **argv) { return 0; } +int main() { return 0; } diff --git a/test cases/common/151 simd/simdchecker.c b/test cases/common/151 simd/simdchecker.c index cd6fe4f..3593828 100644 --- a/test cases/common/151 simd/simdchecker.c +++ b/test cases/common/151 simd/simdchecker.c @@ -23,7 +23,7 @@ int check_simd_implementation(float *four, return rv; } -int main(int argc, char **argv) { +int main() { static const float four_initial[4] = {2.0, 3.0, 4.0, 5.0}; ALIGN_16 float four[4]; const float expected[4] = {3.0, 4.0, 5.0, 6.0}; diff --git a/test cases/common/152 shared module resolving symbol in executable/prog.c b/test cases/common/152 shared module resolving symbol in executable/prog.c index 746c192..b2abcdb 100644 --- a/test cases/common/152 shared module resolving symbol in executable/prog.c +++ b/test cases/common/152 shared module resolving symbol in executable/prog.c @@ -25,12 +25,13 @@ func_from_executable(void) return 42; } -int -main (int argc, char **argv) +int main(int argc, char **argv) { int expected, actual; fptr importedfunc; + if (argc=0) {}; // noop + #ifdef _WIN32 HMODULE h = LoadLibraryA(argv[1]); #else diff --git a/test cases/common/153 dotinclude/dotproc.c b/test cases/common/153 dotinclude/dotproc.c index 5e65f7b..d8f3829 100644 --- a/test cases/common/153 dotinclude/dotproc.c +++ b/test cases/common/153 dotinclude/dotproc.c @@ -4,7 +4,7 @@ #error The wrapper stdio.h was not included. #endif -int main(int argc, char **argv) { +int main() { printf("Eventually I got printed.\n"); return 0; } diff --git a/test cases/common/154 reserved targets/test.c b/test cases/common/154 reserved targets/test.c index 0fb4389..4cce7f6 100644 --- a/test cases/common/154 reserved targets/test.c +++ b/test cases/common/154 reserved targets/test.c @@ -1,3 +1,3 @@ -int main(int argc, char *argv[]) { +int main() { return 0; } diff --git a/test cases/common/157 wrap file should not failed/src/subprojects/foo/prog2.c b/test cases/common/157 wrap file should not failed/src/subprojects/foo/prog2.c index 56f61a8..dc14736 100644 --- a/test cases/common/157 wrap file should not failed/src/subprojects/foo/prog2.c +++ b/test cases/common/157 wrap file should not failed/src/subprojects/foo/prog2.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("Do not have a file layout like this in your own projects.\n"); printf("This is only to test that this works.\n"); return 0; diff --git a/test cases/common/157 wrap file should not failed/src/subprojects/prog.c b/test cases/common/157 wrap file should not failed/src/subprojects/prog.c index 56f61a8..dc14736 100644 --- a/test cases/common/157 wrap file should not failed/src/subprojects/prog.c +++ b/test cases/common/157 wrap file should not failed/src/subprojects/prog.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("Do not have a file layout like this in your own projects.\n"); printf("This is only to test that this works.\n"); return 0; diff --git a/test cases/common/158 includedir subproj/prog.c b/test cases/common/158 includedir subproj/prog.c index 772681e..f388ef8 100644 --- a/test cases/common/158 includedir subproj/prog.c +++ b/test cases/common/158 includedir subproj/prog.c @@ -1,4 +1,4 @@ -int main(int argc, char **argv) { +int main() { return 0; } 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 6ed96fa..db85d41 100644 --- a/test cases/common/159 subproject dir name collision/a.c +++ b/test cases/common/159 subproject dir name collision/a.c @@ -2,7 +2,7 @@ char func_b(); char func_c(); -int main(int argc, char **argv) { +int main() { if(func_b() != 'b') { return 1; } diff --git a/test cases/common/16 else/prog.c b/test cases/common/16 else/prog.c index 0314ff1..76e8197 100644 --- a/test cases/common/16 else/prog.c +++ b/test cases/common/16 else/prog.c @@ -1 +1 @@ -int main(int argc, char **argv) { return 0; } +int main() { return 0; } diff --git a/test cases/common/17 comparison/prog.c b/test cases/common/17 comparison/prog.c index 0314ff1..76e8197 100644 --- a/test cases/common/17 comparison/prog.c +++ b/test cases/common/17 comparison/prog.c @@ -1 +1 @@ -int main(int argc, char **argv) { return 0; } +int main() { return 0; } diff --git a/test cases/common/170 get project license/bar.c b/test cases/common/170 get project license/bar.c index 864869b..cc34d94 100644 --- a/test cases/common/170 get project license/bar.c +++ b/test cases/common/170 get project license/bar.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I'm a main project bar.\n"); return 0; } 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 394f139..0bb5253 100644 --- a/test cases/common/172 subproject nested subproject dirs/prog.c +++ b/test cases/common/172 subproject nested subproject dirs/prog.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func() == 42 ? 0 : 1; } diff --git a/test cases/common/173 preserve gendir/testprog.c b/test cases/common/173 preserve gendir/testprog.c index 46b4602..4484f22 100644 --- a/test cases/common/173 preserve gendir/testprog.c +++ b/test cases/common/173 preserve gendir/testprog.c @@ -1,6 +1,6 @@ #include"base.h" #include"com/mesonbuild/subbie.h" -int main(int argc, char **argv) { +int main() { return base() + subbie(); } diff --git a/test cases/common/174 source in dep/generated/main.c b/test cases/common/174 source in dep/generated/main.c index 07e7c93..75203cb 100644 --- a/test cases/common/174 source in dep/generated/main.c +++ b/test cases/common/174 source in dep/generated/main.c @@ -1,5 +1,5 @@ #include"funheader.h" -int main(int argc, char **argv) { +int main() { return my_wonderful_function() != 42; } diff --git a/test cases/common/18 array/prog.c b/test cases/common/18 array/prog.c index ad58a0b..faad956 100644 --- a/test cases/common/18 array/prog.c +++ b/test cases/common/18 array/prog.c @@ -1,3 +1,3 @@ extern int func(); -int main(int argc, char **argv) { return func(); } +int main() { return func(); } diff --git a/test cases/common/183 bothlibraries/main.c b/test cases/common/183 bothlibraries/main.c index 03a8e02..b02e048 100644 --- a/test cases/common/183 bothlibraries/main.c +++ b/test cases/common/183 bothlibraries/main.c @@ -3,6 +3,6 @@ DO_IMPORT int func(); DO_IMPORT int retval; -int main(int argc, char **arg) { +int main() { return func() == retval ? 0 : 1; } diff --git a/test cases/common/187 find override/otherdir/main.c b/test cases/common/187 find override/otherdir/main.c index 2cef67c..c442282 100644 --- a/test cases/common/187 find override/otherdir/main.c +++ b/test cases/common/187 find override/otherdir/main.c @@ -1,5 +1,5 @@ int be_seeing_you(); -int main(int argc, char **argv) { +int main() { 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 6d71688..e1f00c9 100644 --- a/test cases/common/187 find override/otherdir/main2.c +++ b/test cases/common/187 find override/otherdir/main2.c @@ -1,5 +1,5 @@ int number_returner(); -int main(int argc, char **argv) { +int main() { return number_returner() == 100 ? 0 : 1; } diff --git a/test cases/common/19 includedir/src/prog.c b/test cases/common/19 includedir/src/prog.c index c26b9b3..eb9e2e2 100644 --- a/test cases/common/19 includedir/src/prog.c +++ b/test cases/common/19 includedir/src/prog.c @@ -1,5 +1,5 @@ #include "func.h" -int main(int argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/195 install_mode/trivial.c b/test cases/common/195 install_mode/trivial.c index 24ac454..38b58cc 100644 --- a/test cases/common/195 install_mode/trivial.c +++ b/test cases/common/195 install_mode/trivial.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("Trivial test is working.\n"); return 0; } diff --git a/test cases/common/2 cpp/trivial.cc b/test cases/common/2 cpp/trivial.cc index 8aa907b..c5ade72 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 argc, char **argv) { +int main() { std::cout << "C++ seems to be working." << std::endl; return 0; } diff --git a/test cases/common/20 header in file list/prog.c b/test cases/common/20 header in file list/prog.c index fbedab8..a9216a6 100644 --- a/test cases/common/20 header in file list/prog.c +++ b/test cases/common/20 header in file list/prog.c @@ -1,3 +1,3 @@ #include "header.h" -int main(int argc, char **argv) { return 0; } +int main() { return 0; } diff --git a/test cases/common/200 generator in subdir/com/mesonbuild/testprog.c b/test cases/common/200 generator in subdir/com/mesonbuild/testprog.c index 58867ad..5ea0cb3 100644 --- a/test cases/common/200 generator in subdir/com/mesonbuild/testprog.c +++ b/test cases/common/200 generator in subdir/com/mesonbuild/testprog.c @@ -1,5 +1,5 @@ #include"subbie.h" -int main(int argc, char **argv) { +int main() { return subbie(); } diff --git a/test cases/common/201 override with exe/subprojects/sub/foobar.c b/test cases/common/201 override with exe/subprojects/sub/foobar.c index 030ac49..c21d450 100644 --- a/test cases/common/201 override with exe/subprojects/sub/foobar.c +++ b/test cases/common/201 override with exe/subprojects/sub/foobar.c @@ -2,6 +2,7 @@ #include <stdio.h> int main(int argc, char* argv[]) { + assert(argc == 2); FILE *f = fopen(argv[1], "w"); const char msg[] = "int main(void) {return 0;}\n"; size_t w = fwrite(msg, 1, sizeof(msg) - 1, f); diff --git a/test cases/common/202 subproject with features/nothing.c b/test cases/common/202 subproject with features/nothing.c index 77750c2..5bc5493 100644 --- a/test cases/common/202 subproject with features/nothing.c +++ b/test cases/common/202 subproject with features/nothing.c @@ -1,4 +1,4 @@ -int main(int argc, char const *argv[]) +int main() { return 0; }
\ No newline at end of file diff --git a/test cases/common/207 kwarg entry/prog.c b/test cases/common/207 kwarg entry/prog.c index 0c57f66..6d1e2f9 100644 --- a/test cases/common/207 kwarg entry/prog.c +++ b/test cases/common/207 kwarg entry/prog.c @@ -1,7 +1,7 @@ #include<prog.h> #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf(MESSAGE); return 0; } diff --git a/test cases/common/21 global arg/prog.c b/test cases/common/21 global arg/prog.c index 74d11aa..9c4660b 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 argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/21 global arg/prog.cc b/test cases/common/21 global arg/prog.cc index 0ffd85e..9a18362 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 argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/215 link custom/prog.c b/test cases/common/215 link custom/prog.c index eaede6d..22487c5 100644 --- a/test cases/common/215 link custom/prog.c +++ b/test cases/common/215 link custom/prog.c @@ -1,6 +1,6 @@ void flob(); -int main(int argc, char **argv) { +int main() { flob(); return 0; } 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 8013034..7826d74 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,5 +1,5 @@ int flob(); -int main(int argc, char **argv) { +int main() { 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 51effe6..3476899 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,7 +1,7 @@ void flob_1(); void flob_2(); -int main(int argc, char **argv) { +int main() { flob_1(); flob_2(); return 0; diff --git a/test cases/common/22 target arg/prog.cc b/test cases/common/22 target arg/prog.cc index d1893ba..4a3aa1f 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 argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/22 target arg/prog2.cc b/test cases/common/22 target arg/prog2.cc index ef2fc4b..8158d14 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 argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/23 object extraction/main.c b/test cases/common/23 object extraction/main.c index 394f139..0bb5253 100644 --- a/test cases/common/23 object extraction/main.c +++ b/test cases/common/23 object extraction/main.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func() == 42 ? 0 : 1; } diff --git a/test cases/common/24 endian/prog.c b/test cases/common/24 endian/prog.c index b2a10d0..b598b7a 100644 --- a/test cases/common/24 endian/prog.c +++ b/test cases/common/24 endian/prog.c @@ -8,7 +8,7 @@ int is_big_endian(void) { } -int main(int argc, char **argv) { +int main() { int is_be_check = is_big_endian(); int is_be; #ifdef IS_BE diff --git a/test cases/common/26 config subdir/src/prog.c b/test cases/common/26 config subdir/src/prog.c index 4c03c20..15a10d1 100644 --- a/test cases/common/26 config subdir/src/prog.c +++ b/test cases/common/26 config subdir/src/prog.c @@ -1,5 +1,5 @@ #include "config.h" -int main(int argc, char **argv) { +int main() { return RETURN_VALUE; } diff --git a/test cases/common/27 pipeline/depends/filecopier.c b/test cases/common/27 pipeline/depends/filecopier.c index 9001cf3..e10e4e7 100644 --- a/test cases/common/27 pipeline/depends/filecopier.c +++ b/test cases/common/27 pipeline/depends/filecopier.c @@ -9,6 +9,7 @@ int main(int argc, char **argv) { size_t num_written; FILE *fin = fopen(argv[1], "rb"); FILE *fout; + assert(argc>0); assert(fin); num_read = fread(buffer, 1, BUFSIZE, fin); assert(num_read > 0); diff --git a/test cases/common/27 pipeline/depends/prog.c b/test cases/common/27 pipeline/depends/prog.c index f4a7dd3..f438a00 100644 --- a/test cases/common/27 pipeline/depends/prog.c +++ b/test cases/common/27 pipeline/depends/prog.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func() != 42; } diff --git a/test cases/common/27 pipeline/prog.c b/test cases/common/27 pipeline/prog.c index 175a90d..458fc84 100644 --- a/test cases/common/27 pipeline/prog.c +++ b/test cases/common/27 pipeline/prog.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/27 pipeline/src/prog.c b/test cases/common/27 pipeline/src/prog.c index 29396b9..e693d8a 100644 --- a/test cases/common/27 pipeline/src/prog.c +++ b/test cases/common/27 pipeline/src/prog.c @@ -1,6 +1,6 @@ #include"input_src.h" -int main(int argc, char **argv) { +int main() { void *foo = printf; if(foo) { return 0; diff --git a/test cases/common/28 find program/source.in b/test cases/common/28 find program/source.in index 5c2fa9b..4cce7f6 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 argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/29 multiline string/meson.build b/test cases/common/29 multiline string/meson.build index 262cb15..8ed153c 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 argc, char **argv) { +int main() { int num = 1; printf("%d\n", num); return 0; diff --git a/test cases/common/32 sizeof/prog.c.in b/test cases/common/32 sizeof/prog.c.in index 85b1229..99432f7 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 argc, char **argv) { +int main() { 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/33 define10/prog.c b/test cases/common/33 define10/prog.c index 10e94f1..d13995b 100644 --- a/test cases/common/33 define10/prog.c +++ b/test cases/common/33 define10/prog.c @@ -1,7 +1,7 @@ #include<stdio.h> #include"config.h" -int main(int argc, char **argv) { +int main() { if(ONE != 1) { fprintf(stderr, "ONE is not 1.\n"); return 1; diff --git a/test cases/common/36 tryrun/error.c b/test cases/common/36 tryrun/error.c index 80eeb5d..16db28e 100644 --- a/test cases/common/36 tryrun/error.c +++ b/test cases/common/36 tryrun/error.c @@ -1,3 +1,3 @@ -int main(int argc, char **argv) { +int main() { return 1; } diff --git a/test cases/common/36 tryrun/meson.build b/test cases/common/36 tryrun/meson.build index c64446f..6682a33 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 argc, char **argv) { +int main() { printf("%s\n", "stdout"); fprintf(stderr, "%s\n", "stderr"); return 0; } ''' -error_code = '''int main(int argc, char **argv) { +error_code = '''int main() { return 1; } ''' -no_compile_code = '''int main(int argc, char **argv) { +no_compile_code = '''int main() { ''' INPUTS = [ diff --git a/test cases/common/36 tryrun/no_compile.c b/test cases/common/36 tryrun/no_compile.c index 86b67ac..b3b753c 100644 --- a/test cases/common/36 tryrun/no_compile.c +++ b/test cases/common/36 tryrun/no_compile.c @@ -1 +1 @@ -int main(int argc, char **argv) { +int main() { diff --git a/test cases/common/36 tryrun/ok.c b/test cases/common/36 tryrun/ok.c index 4111c74..0c987d9 100644 --- a/test cases/common/36 tryrun/ok.c +++ b/test cases/common/36 tryrun/ok.c @@ -1,5 +1,5 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("%s\n", "stdout"); fprintf(stderr, "%s\n", "stderr"); return 0; diff --git a/test cases/common/44 test args/env2vars.c b/test cases/common/44 test args/env2vars.c index 19250a8..f6c8ba3 100644 --- a/test cases/common/44 test args/env2vars.c +++ b/test cases/common/44 test args/env2vars.c @@ -2,7 +2,7 @@ #include<string.h> #include<stdlib.h> -int main(int argc, char **argv) { +int main() { if(strcmp(getenv("first"), "something-else") != 0) { fprintf(stderr, "First envvar is wrong. %s\n", getenv("first")); return 1; diff --git a/test cases/common/44 test args/envvars.c b/test cases/common/44 test args/envvars.c index 627e413..e40cc9b 100644 --- a/test cases/common/44 test args/envvars.c +++ b/test cases/common/44 test args/envvars.c @@ -2,7 +2,7 @@ #include<string.h> #include<stdlib.h> -int main(int argc, char **argv) { +int main() { if(strcmp(getenv("first"), "val1") != 0) { fprintf(stderr, "First envvar is wrong. %s\n", getenv("first")); return 1; diff --git a/test cases/common/45 subproject/subprojects/sublib/simpletest.c b/test cases/common/45 subproject/subprojects/sublib/simpletest.c index 3801a40..01d0f25 100644 --- a/test cases/common/45 subproject/subprojects/sublib/simpletest.c +++ b/test cases/common/45 subproject/subprojects/sublib/simpletest.c @@ -1,5 +1,5 @@ #include<subdefs.h> -int main(int argc, char **argv) { +int main() { return subfunc() == 42 ? 0 : 1; } diff --git a/test cases/common/45 subproject/user.c b/test cases/common/45 subproject/user.c index cfde532..ec34477 100644 --- a/test cases/common/45 subproject/user.c +++ b/test cases/common/45 subproject/user.c @@ -2,7 +2,7 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { int res; printf("Calling into sublib now.\n"); res = subfunc(); diff --git a/test cases/common/48 custom install dirs/prog.c b/test cases/common/48 custom install dirs/prog.c index 0f0061d..33c14ce 100644 --- a/test cases/common/48 custom install dirs/prog.c +++ b/test cases/common/48 custom install dirs/prog.c @@ -1,3 +1,3 @@ -int main(int argc, char **arv) { +int main() { return 0; } diff --git a/test cases/common/49 subproject subproject/prog.c b/test cases/common/49 subproject subproject/prog.c index 394f139..0bb5253 100644 --- a/test cases/common/49 subproject subproject/prog.c +++ b/test cases/common/49 subproject subproject/prog.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func() == 42 ? 0 : 1; } diff --git a/test cases/common/5 linkstatic/main.c b/test cases/common/5 linkstatic/main.c index 8aadb0c..458fc84 100644 --- a/test cases/common/5 linkstatic/main.c +++ b/test cases/common/5 linkstatic/main.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **arg) { +int main() { return func(); } diff --git a/test cases/common/50 same file name/prog.c b/test cases/common/50 same file name/prog.c index 3441288..6e3628e 100644 --- a/test cases/common/50 same file name/prog.c +++ b/test cases/common/50 same file name/prog.c @@ -1,6 +1,6 @@ int func1(); int func2(); -int main(int argc, char **argv) { +int main() { return func1() - func2(); } diff --git a/test cases/common/51 file grabber/prog.c b/test cases/common/51 file grabber/prog.c index 3524f60..581b0e7 100644 --- a/test cases/common/51 file grabber/prog.c +++ b/test cases/common/51 file grabber/prog.c @@ -2,6 +2,6 @@ int funca(); int funcb(); int funcc(); -int main(int argc, char **argv) { +int main() { return funca() + funcb() + funcc(); } diff --git a/test cases/common/51 file grabber/subdir/subprog.c b/test cases/common/51 file grabber/subdir/subprog.c index 3524f60..581b0e7 100644 --- a/test cases/common/51 file grabber/subdir/subprog.c +++ b/test cases/common/51 file grabber/subdir/subprog.c @@ -2,6 +2,6 @@ int funca(); int funcb(); int funcc(); -int main(int argc, char **argv) { +int main() { return funca() + funcb() + funcc(); } diff --git a/test cases/common/53 custom target chain/usetarget/myexe.c b/test cases/common/53 custom target chain/usetarget/myexe.c index f9874fd..a5a13c3 100644 --- a/test cases/common/53 custom target chain/usetarget/myexe.c +++ b/test cases/common/53 custom target chain/usetarget/myexe.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I am myexe.\n"); return 0; } diff --git a/test cases/common/55 object generator/prog.c b/test cases/common/55 object generator/prog.c index 60459d6..09f2790 100644 --- a/test cases/common/55 object generator/prog.c +++ b/test cases/common/55 object generator/prog.c @@ -2,6 +2,6 @@ int func1_in_obj(); int func2_in_obj(); int func3_in_obj(); -int main(int argc, char **argv) { +int main() { return func1_in_obj() + func2_in_obj() + func3_in_obj(); } diff --git a/test cases/common/56 install script/prog.c b/test cases/common/56 install script/prog.c index 06bc6b1..1d32c26 100644 --- a/test cases/common/56 install script/prog.c +++ b/test cases/common/56 install script/prog.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("This is text.\n"); return 0; } diff --git a/test cases/common/57 custom target source output/main.c b/test cases/common/57 custom target source output/main.c index 2813c39..ca9909b 100644 --- a/test cases/common/57 custom target source output/main.c +++ b/test cases/common/57 custom target source output/main.c @@ -1,5 +1,5 @@ #include"mylib.h" -int main(int argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/58 exe static shared/prog.c b/test cases/common/58 exe static shared/prog.c index 26603b6..b1dbe14 100644 --- a/test cases/common/58 exe static shared/prog.c +++ b/test cases/common/58 exe static shared/prog.c @@ -1,7 +1,7 @@ int shlibfunc2(); int statlibfunc(); -int main(int argc, char **argv) { +int main() { if (statlibfunc() != 42) return 1; if (shlibfunc2() != 24) diff --git a/test cases/common/6 linkshared/cppmain.cpp b/test cases/common/6 linkshared/cppmain.cpp index b2e4025..a7e27db 100644 --- a/test cases/common/6 linkshared/cppmain.cpp +++ b/test cases/common/6 linkshared/cppmain.cpp @@ -1,5 +1,5 @@ int cppfunc(); -int main(int argc, char **argv) { +int main() { return cppfunc() != 42; } diff --git a/test cases/common/6 linkshared/main.c b/test cases/common/6 linkshared/main.c index 12f9c98..ff5a732 100644 --- a/test cases/common/6 linkshared/main.c +++ b/test cases/common/6 linkshared/main.c @@ -6,6 +6,6 @@ int DLL_IMPORT func(); -int main(int argc, char **arg) { +int main() { return func(); } diff --git a/test cases/common/60 custom header generator/prog.c b/test cases/common/60 custom header generator/prog.c index 184973a..2d071af 100644 --- a/test cases/common/60 custom header generator/prog.c +++ b/test cases/common/60 custom header generator/prog.c @@ -1,5 +1,5 @@ #include"myheader.lh" -int main(int argc, char **argv) { +int main() { return RET_VAL; } diff --git a/test cases/common/61 multiple generators/main.cpp b/test cases/common/61 multiple generators/main.cpp index 5277063..82027c8 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 argc, char **argv) { +int main() { return func1() + func2(); } diff --git a/test cases/common/63 foreach/prog1.c b/test cases/common/63 foreach/prog1.c index a5ef0f1..30c67df 100644 --- a/test cases/common/63 foreach/prog1.c +++ b/test cases/common/63 foreach/prog1.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("This is test #1.\n"); return 0; } diff --git a/test cases/common/63 foreach/prog2.c b/test cases/common/63 foreach/prog2.c index b9fddbe..c25a205 100644 --- a/test cases/common/63 foreach/prog2.c +++ b/test cases/common/63 foreach/prog2.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("This is test #2.\n"); return 0; } diff --git a/test cases/common/63 foreach/prog3.c b/test cases/common/63 foreach/prog3.c index 5657396..7bea76d 100644 --- a/test cases/common/63 foreach/prog3.c +++ b/test cases/common/63 foreach/prog3.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("This is test #3.\n"); return 0; } diff --git a/test cases/common/68 build always/main.c b/test cases/common/68 build always/main.c index f8d9ac9..3632ab8 100644 --- a/test cases/common/68 build always/main.c +++ b/test cases/common/68 build always/main.c @@ -1,7 +1,7 @@ #include<stdio.h> #include"version.h" -int main(int argc, char **argv) { +int main() { printf("Version is %s.\n", version_string); return 0; } diff --git a/test cases/common/69 vcstag/tagprog.c b/test cases/common/69 vcstag/tagprog.c index 34146b4..1c47e52 100644 --- a/test cases/common/69 vcstag/tagprog.c +++ b/test cases/common/69 vcstag/tagprog.c @@ -2,7 +2,7 @@ const char *vcstag; -int main(int argc, char **argv) { +int main() { printf("Version is %s\n", vcstag); return 0; } diff --git a/test cases/common/7 mixed/main.cc b/test cases/common/7 mixed/main.cc index f165346..29c680f 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 argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/71 should fail/failing.c b/test cases/common/71 should fail/failing.c index adada8d..6346e2d 100644 --- a/test cases/common/71 should fail/failing.c +++ b/test cases/common/71 should fail/failing.c @@ -1,3 +1,3 @@ -int main(int argc, char **argv) { +int main() { return 1; } diff --git a/test cases/common/75 shared subproject/a.c b/test cases/common/75 shared subproject/a.c index 6ed96fa..db85d41 100644 --- a/test cases/common/75 shared subproject/a.c +++ b/test cases/common/75 shared subproject/a.c @@ -2,7 +2,7 @@ char func_b(); char func_c(); -int main(int argc, char **argv) { +int main() { if(func_b() != 'b') { return 1; } diff --git a/test cases/common/76 shared subproject 2/a.c b/test cases/common/76 shared subproject 2/a.c index 6ed96fa..db85d41 100644 --- a/test cases/common/76 shared subproject 2/a.c +++ b/test cases/common/76 shared subproject 2/a.c @@ -2,7 +2,7 @@ char func_b(); char func_c(); -int main(int argc, char **argv) { +int main() { if(func_b() != 'b') { return 1; } diff --git a/test cases/common/77 file object/prog.c b/test cases/common/77 file object/prog.c index 884d678..c2b6e98 100644 --- a/test cases/common/77 file object/prog.c +++ b/test cases/common/77 file object/prog.c @@ -2,7 +2,7 @@ int func(); /* Files in different subdirs return different values. */ -int main(int argc, char **argv) { +int main() { if(func() == 0) { printf("Iz success.\n"); } else { diff --git a/test cases/common/77 file object/subdir1/prog.c b/test cases/common/77 file object/subdir1/prog.c index 37ccf72..cba4b14 100644 --- a/test cases/common/77 file object/subdir1/prog.c +++ b/test cases/common/77 file object/subdir1/prog.c @@ -2,7 +2,7 @@ int func(); -int main(int argc, char **argv) { +int main() { if(func() == 1) { printf("Iz success.\n"); } else { diff --git a/test cases/common/77 file object/subdir2/prog.c b/test cases/common/77 file object/subdir2/prog.c index 3a90b0a..124c98b 100644 --- a/test cases/common/77 file object/subdir2/prog.c +++ b/test cases/common/77 file object/subdir2/prog.c @@ -2,7 +2,7 @@ int func(); -int main(int argc, char **argv) { +int main() { if(func() == 2) { printf("Iz success.\n"); } else { diff --git a/test cases/common/78 custom subproject dir/a.c b/test cases/common/78 custom subproject dir/a.c index 6ed96fa..db85d41 100644 --- a/test cases/common/78 custom subproject dir/a.c +++ b/test cases/common/78 custom subproject dir/a.c @@ -2,7 +2,7 @@ char func_b(); char func_c(); -int main(int argc, char **argv) { +int main() { if(func_b() != 'b') { return 1; } diff --git a/test cases/common/8 install/prog.c b/test cases/common/8 install/prog.c index 11b7fad..33c14ce 100644 --- a/test cases/common/8 install/prog.c +++ b/test cases/common/8 install/prog.c @@ -1,3 +1,3 @@ -int main(int argc, char **argv) { +int main() { return 0; } diff --git a/test cases/common/81 internal dependency/src/main.c b/test cases/common/81 internal dependency/src/main.c index 7d50b05..137cc61 100644 --- a/test cases/common/81 internal dependency/src/main.c +++ b/test cases/common/81 internal dependency/src/main.c @@ -1,7 +1,7 @@ #include<stdio.h> #include<proj1.h> -int main(int argc, char **argv) { +int main() { printf("Now calling into library.\n"); proj1_func1(); proj1_func2(); diff --git a/test cases/common/82 same basename/exe1.c b/test cases/common/82 same basename/exe1.c index 175a90d..458fc84 100644 --- a/test cases/common/82 same basename/exe1.c +++ b/test cases/common/82 same basename/exe1.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func(); } diff --git a/test cases/common/82 same basename/exe2.c b/test cases/common/82 same basename/exe2.c index 56b04cc..9dbb09d 100644 --- a/test cases/common/82 same basename/exe2.c +++ b/test cases/common/82 same basename/exe2.c @@ -1,5 +1,5 @@ int func(); -int main(int argc, char **argv) { +int main() { return func() == 1 ? 0 : 1; } diff --git a/test cases/common/83 declare dep/main.c b/test cases/common/83 declare dep/main.c index 4ad9d2a..3c37f81 100644 --- a/test cases/common/83 declare dep/main.c +++ b/test cases/common/83 declare dep/main.c @@ -5,7 +5,7 @@ #error "Entity use flag not used for compilation." #endif -int main(int argc, char **argv) { +int main() { if(entity_func1() != 5) { printf("Error in func1.\n"); return 1; diff --git a/test cases/common/84 extract all/prog.c b/test cases/common/84 extract all/prog.c index 57a4c64..48e7680 100644 --- a/test cases/common/84 extract all/prog.c +++ b/test cases/common/84 extract all/prog.c @@ -1,7 +1,7 @@ #include"extractor.h" #include<stdio.h> -int main(int argc, char **argv) { +int main() { if((1+2+3+4) != (func1() + func2() + func3() + func4())) { printf("Arithmetic is fail.\n"); return 1; diff --git a/test cases/common/85 add language/prog.c b/test cases/common/85 add language/prog.c index 9b5685f..bdd43ff 100644 --- a/test cases/common/85 add language/prog.c +++ b/test cases/common/85 add language/prog.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I am plain C.\n"); return 0; } diff --git a/test cases/common/86 identical target name in subproject/bar.c b/test cases/common/86 identical target name in subproject/bar.c index 864869b..cc34d94 100644 --- a/test cases/common/86 identical target name in subproject/bar.c +++ b/test cases/common/86 identical target name in subproject/bar.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I'm a main project bar.\n"); return 0; } diff --git a/test cases/common/86 identical target name in subproject/subprojects/foo/bar.c b/test cases/common/86 identical target name in subproject/subprojects/foo/bar.c index 106005e..6e72576 100644 --- a/test cases/common/86 identical target name in subproject/subprojects/foo/bar.c +++ b/test cases/common/86 identical target name in subproject/subprojects/foo/bar.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I'm a subproject bar.\n"); return 0; } diff --git a/test cases/common/89 private include/user/libuser.c b/test cases/common/89 private include/user/libuser.c index a74a973..b72bb4d 100644 --- a/test cases/common/89 private include/user/libuser.c +++ b/test cases/common/89 private include/user/libuser.c @@ -1,6 +1,6 @@ #include"foo1.h" #include"foo2.h" -int main(int argc, char **argv) { +int main() { return foo1() + foo2(); } diff --git a/test cases/common/93 selfbuilt custom/mainprog.cpp b/test cases/common/93 selfbuilt custom/mainprog.cpp index dcf9d20..6255028 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, char **) { +int main() { return generated_function() != 52; } diff --git a/test cases/common/94 gen extra/plain.c b/test cases/common/94 gen extra/plain.c index 3845aee..914de72 100644 --- a/test cases/common/94 gen extra/plain.c +++ b/test cases/common/94 gen extra/plain.c @@ -1,5 +1,5 @@ int bob_mcbob(); -int main(int argc, char **argv) { +int main() { return bob_mcbob(); } diff --git a/test cases/common/94 gen extra/upper.c b/test cases/common/94 gen extra/upper.c index 44f8ad7..dad78fc 100644 --- a/test cases/common/94 gen extra/upper.c +++ b/test cases/common/94 gen extra/upper.c @@ -1,5 +1,5 @@ int BOB_MCBOB(); -int main(int argc, char **argv) { +int main() { return BOB_MCBOB(); } diff --git a/test cases/common/95 benchmark/delayer.c b/test cases/common/95 benchmark/delayer.c index cfcedad..c8da7ae 100644 --- a/test cases/common/95 benchmark/delayer.c +++ b/test cases/common/95 benchmark/delayer.c @@ -6,7 +6,7 @@ #include<windows.h> #endif -int main(int argc, char **argv) { +int main() { srand(time(NULL)); #if !defined(_WIN32) struct timespec t; diff --git a/test cases/common/96 test workdir/opener.c b/test cases/common/96 test workdir/opener.c index 43c53ce..7be914d 100644 --- a/test cases/common/96 test workdir/opener.c +++ b/test cases/common/96 test workdir/opener.c @@ -2,7 +2,7 @@ #include<stdio.h> -int main(int arg, char **argv) { +int main() { FILE *f = fopen("opener.c", "r"); if(f) { fclose(f); diff --git a/test cases/common/97 suites/exe1.c b/test cases/common/97 suites/exe1.c index 23894c0..89a1c4e 100644 --- a/test cases/common/97 suites/exe1.c +++ b/test cases/common/97 suites/exe1.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I am test exe1.\n"); return 0; } diff --git a/test cases/common/97 suites/exe2.c b/test cases/common/97 suites/exe2.c index ec88e20..92f287d 100644 --- a/test cases/common/97 suites/exe2.c +++ b/test cases/common/97 suites/exe2.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I am test exe2.\n"); return 0; } diff --git a/test cases/common/97 suites/subprojects/sub/sub1.c b/test cases/common/97 suites/subprojects/sub/sub1.c index 3409e48..ab5822a 100644 --- a/test cases/common/97 suites/subprojects/sub/sub1.c +++ b/test cases/common/97 suites/subprojects/sub/sub1.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I am test sub1.\n"); return 0; } diff --git a/test cases/common/97 suites/subprojects/sub/sub2.c b/test cases/common/97 suites/subprojects/sub/sub2.c index 1a64a2a..f1e6d78 100644 --- a/test cases/common/97 suites/subprojects/sub/sub2.c +++ b/test cases/common/97 suites/subprojects/sub/sub2.c @@ -1,6 +1,6 @@ #include<stdio.h> -int main(int argc, char **argv) { +int main() { printf("I am test sub2.\n"); return 0; } diff --git a/test cases/common/98 threads/threadprog.c b/test cases/common/98 threads/threadprog.c index 47a5d18..5db40f1 100644 --- a/test cases/common/98 threads/threadprog.c +++ b/test cases/common/98 threads/threadprog.c @@ -3,12 +3,12 @@ #include<windows.h> #include<stdio.h> -DWORD WINAPI thread_func(LPVOID ignored) { +DWORD WINAPI thread_func() { printf("Printing from a thread.\n"); return 0; } -int main(int argc, char **argv) { +int main() { DWORD id; HANDLE th; printf("Starting thread.\n"); @@ -22,12 +22,12 @@ int main(int argc, char **argv) { #include<pthread.h> #include<stdio.h> -void* main_func(void* ignored) { +void* main_func() { printf("Printing from a thread.\n"); return NULL; } -int main(int argc, char** argv) { +int main() { pthread_t thread; int rc; printf("Starting thread.\n"); diff --git a/test cases/common/98 threads/threadprog.cpp b/test cases/common/98 threads/threadprog.cpp index 6fd747f..18fa9f5 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, char**) { +int main() { printf("Starting thread.\n"); HANDLE th; DWORD id; @@ -32,7 +32,7 @@ void main_func() { printf("Printing from a thread.\n"); } -int main(int, char**) { +int main() { printf("Starting thread.\n"); std::thread th(main_func); th.join(); diff --git a/test cases/common/99 manygen/depuser.c b/test cases/common/99 manygen/depuser.c index 1a825e0..6374cd0 100644 --- a/test cases/common/99 manygen/depuser.c +++ b/test cases/common/99 manygen/depuser.c @@ -1,6 +1,6 @@ #include"gen_func.h" -int main(int argc, char **argv) { +int main() { unsigned int i = (unsigned int) gen_func_in_lib(); unsigned int j = (unsigned int) gen_func_in_obj(); unsigned int k = (unsigned int) gen_func_in_src(); diff --git a/test cases/fortran/1 basic/simple.f90 b/test cases/fortran/1 basic/simple.f90 index e0fb1d8..53aeb4d 100644 --- a/test cases/fortran/1 basic/simple.f90 +++ b/test cases/fortran/1 basic/simple.f90 @@ -1,3 +1,2 @@ -program prog - print *, "Fortran compilation is working." -end program prog +print *, "Fortran compilation is working." +end program diff --git a/test cases/fortran/12 submodule/a1.f90 b/test cases/fortran/12 submodule/a1.f90 index cb44916..c4b4555 100644 --- a/test cases/fortran/12 submodule/a1.f90 +++ b/test cases/fortran/12 submodule/a1.f90 @@ -15,6 +15,7 @@ end module a1 program hierN use a1 +real :: tau, pi pi = get_pi() diff --git a/test cases/fortran/9 cpp/main.cpp b/test cases/fortran/9 cpp/main.cpp index f5828f4..a3eeaec 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, char**) { +int main() { std::cout << "FORTRAN gave us this number: " << fortran() << '\n'; return 0; } diff --git a/test cases/linuxlike/1 pkg-config/meson.build b/test cases/linuxlike/1 pkg-config/meson.build index 891fea4..87a6e65 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 argc, char **argv) { +int main() { 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 16b7170..9c5f4f2 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 argc, char **argv) { +int main() { 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 cea986d..e5774b7 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 argc, char **argv) { +int main() { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c b/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c index c9eff99..5009531 100644 --- a/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c +++ b/test cases/linuxlike/11 runpath rpath ldlibrarypath/main.c @@ -2,7 +2,7 @@ int some_symbol (void); -int main (int argc, char *argv[]) { +int main () { int ret = some_symbol (); if (ret == 1) 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 8793c62..e4969c3 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 argc, char **argv) { +int main() { int life = a_fun() + b_fun(); printf("%d\n", life); return 0; diff --git a/test cases/linuxlike/13 cmake dependency/meson.build b/test cases/linuxlike/13 cmake dependency/meson.build index 7d99764..bae85aa 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 argc, char **argv) { +int main() { 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 16b7170..9c5f4f2 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 argc, char **argv) { +int main() { 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 cea986d..e5774b7 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 argc, char **argv) { +int main() { 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 0c92690..ec87f59 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 argc, char *argv[]) { +int main() { printf("Hello World\n"); void * something = deflate; if(something != 0) diff --git a/test cases/linuxlike/2 external library/meson.build b/test cases/linuxlike/2 external library/meson.build index e17942d..43070f5 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 argc, char **argv) { +int main() { void *ptr = (void*)(deflate); return ptr == 0; } ''' nolinkcode='''int nonexisting(); -int main(int argc, char **argv) { +int main() { return nonexisting(); } ''' diff --git a/test cases/linuxlike/2 external library/prog.c b/test cases/linuxlike/2 external library/prog.c index cea986d..e5774b7 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 argc, char **argv) { +int main() { void * something = deflate; if(something != 0) return 0; diff --git a/test cases/linuxlike/3 linker script/prog.c b/test cases/linuxlike/3 linker script/prog.c index da9c675..2c9b01b 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 argc, char **argv) { +int main() { return bobMcBob() != 42; } diff --git a/test cases/linuxlike/4 extdep static lib/prog.c b/test cases/linuxlike/4 extdep static lib/prog.c index 843c628..c0268aa 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 main(int argc, char **argv) { +int main() { return statlibfunc(); } diff --git a/test cases/linuxlike/7 library versions/exe.orig.c b/test cases/linuxlike/7 library versions/exe.orig.c index 86c4adc..7074d2f 100644 --- a/test cases/linuxlike/7 library versions/exe.orig.c +++ b/test cases/linuxlike/7 library versions/exe.orig.c @@ -1,7 +1,6 @@ int myFunc (void); -int -main (int argc, char *argv[]) +int main() { if (myFunc() == 55) return 0; 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 9f1755b..315971e 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 argc, char *argv[]) { +int main () { 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 argc, char *argv[]) { +int main() { void *ptr = (void*)(deflate); return ptr == 0; } diff --git a/test cases/windows/1 basic/prog.c b/test cases/windows/1 basic/prog.c index 58162a4..b94a38f 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 argc, char **argv) { +int main() { 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 f35f4a0..2567760 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 argc, char **argv) { +int main() { return somedllfunc() == 42 ? 0 : 1; } diff --git a/test cases/windows/11 exe implib/prog.c b/test cases/windows/11 exe implib/prog.c index 6d5a9f5..2192019 100644 --- a/test cases/windows/11 exe implib/prog.c +++ b/test cases/windows/11 exe implib/prog.c @@ -1,6 +1,6 @@ #include <windows.h> int __declspec(dllexport) -main(int argc, char **argv) { +main() { return 0; } diff --git a/test cases/windows/16 gui app/console_prog.c b/test cases/windows/16 gui app/console_prog.c index 11b7fad..33c14ce 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 argc, char **argv) { +int main() { 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 f35f4a0..2567760 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 argc, char **argv) { +int main() { 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 86c4adc..7074d2f 100644 --- a/test cases/windows/7 dll versioning/exe.orig.c +++ b/test cases/windows/7 dll versioning/exe.orig.c @@ -1,7 +1,6 @@ int myFunc (void); -int -main (int argc, char *argv[]) +int main() { 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 f35f4a0..2567760 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 argc, char **argv) { +int main() { return somedllfunc() == 42 ? 0 : 1; } |