summaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com>2019-11-18 15:21:37 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-11-18 22:21:36 +0200
commit83b4e981c4dd8b8ea521a6150a34636d10a67211 (patch)
tree3ac84e307e6a2589073a7542a0d7127738f09576 /test cases/common
parent0435691e83fb7172e2a9635d2eb32d5521089916 (diff)
downloadmeson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.gz
Use strict function prototypes
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/102 subproject subdir/subprojects/sub/lib/sub.c2
-rw-r--r--test cases/common/102 subproject subdir/subprojects/sub/lib/sub.h2
-rw-r--r--test cases/common/106 extract same name/lib.c2
-rw-r--r--test cases/common/106 extract same name/main.c4
-rw-r--r--test cases/common/106 extract same name/src/lib.c2
-rw-r--r--test cases/common/114 allgenerate/foobar.cpp.in2
-rw-r--r--test cases/common/116 subdir subproject/subprojects/sub/sub.c2
-rw-r--r--test cases/common/116 subdir subproject/subprojects/sub/sub.h2
-rw-r--r--test cases/common/119 subproject project arguments/exe.cpp2
-rw-r--r--test cases/common/121 shared module/module.c6
-rw-r--r--test cases/common/122 llvm ir and assembly/main.cpp2
-rw-r--r--test cases/common/123 cpp and asm/trivial.cc2
-rw-r--r--test cases/common/124 extract all shared library/extractor.h8
-rw-r--r--test cases/common/124 extract all shared library/four.c2
-rw-r--r--test cases/common/124 extract all shared library/one.c2
-rw-r--r--test cases/common/124 extract all shared library/three.c2
-rw-r--r--test cases/common/124 extract all shared library/two.c2
-rw-r--r--test cases/common/125 object only target/prog.c6
-rw-r--r--test cases/common/125 object only target/source.c2
-rw-r--r--test cases/common/125 object only target/source2.c2
-rw-r--r--test cases/common/125 object only target/source3.c2
-rw-r--r--test cases/common/126 no buildincdir/include/header.h2
-rw-r--r--test cases/common/13 pch/c/prog.c2
-rw-r--r--test cases/common/13 pch/cpp/prog.cc4
-rw-r--r--test cases/common/13 pch/mixed/func.c4
-rw-r--r--test cases/common/13 pch/mixed/main.cc4
-rw-r--r--test cases/common/13 pch/userDefined/pch/pch.c2
-rw-r--r--test cases/common/13 pch/withIncludeDirectories/prog.c2
-rw-r--r--test cases/common/135 override options/four.c4
-rw-r--r--test cases/common/135 override options/one.c2
-rw-r--r--test cases/common/135 override options/three.c4
-rw-r--r--test cases/common/137 c cpp and asm/main.cpp2
-rw-r--r--test cases/common/138 compute int/prog.c.in2
-rw-r--r--test cases/common/139 custom target object output/objdir/source.c2
-rw-r--r--test cases/common/139 custom target object output/progdir/prog.c2
-rw-r--r--test cases/common/141 whole archive/func1.c2
-rw-r--r--test cases/common/141 whole archive/func2.c2
-rw-r--r--test cases/common/141 whole archive/mylib.h4
-rw-r--r--test cases/common/149 recursive linking/3rdorderdeps/main.c.in2
-rw-r--r--test cases/common/151 simd/simd_avx.c6
-rw-r--r--test cases/common/151 simd/simd_avx2.c6
-rw-r--r--test cases/common/151 simd/simd_mmx.c8
-rw-r--r--test cases/common/151 simd/simd_neon.c2
-rw-r--r--test cases/common/151 simd/simd_sse.c6
-rw-r--r--test cases/common/151 simd/simd_sse2.c6
-rw-r--r--test cases/common/151 simd/simd_sse3.c6
-rw-r--r--test cases/common/151 simd/simd_sse41.c6
-rw-r--r--test cases/common/151 simd/simd_sse42.c6
-rw-r--r--test cases/common/151 simd/simd_ssse3.c4
-rw-r--r--test cases/common/151 simd/simdfuncs.h22
-rw-r--r--test cases/common/157 wrap file should not failed/subprojects/foo-1.0/foo.c2
-rw-r--r--test cases/common/157 wrap file should not failed/subprojects/zlib-1.2.8/foo.c2
-rw-r--r--test cases/common/159 subproject dir name collision/a.c4
-rw-r--r--test cases/common/159 subproject dir name collision/custom_subproject_dir/B/b.c4
-rw-r--r--test cases/common/159 subproject dir name collision/custom_subproject_dir/C/c.c2
-rw-r--r--test cases/common/159 subproject dir name collision/other_subdir/custom_subproject_dir/other.c2
-rw-r--r--test cases/common/161 custom target subdir depend files/subdir/foo.c.in2
-rw-r--r--test cases/common/165 custom target template substitution/foo.c.in2
-rw-r--r--test cases/common/166 not-found dependency/subprojects/trivial/trivial.c2
-rw-r--r--test cases/common/172 subproject nested subproject dirs/contrib/subprojects/alpha/a.c4
-rw-r--r--test cases/common/172 subproject nested subproject dirs/contrib/subprojects/beta/b.c2
-rw-r--r--test cases/common/172 subproject nested subproject dirs/prog.c2
-rwxr-xr-xtest cases/common/173 preserve gendir/genprog.py4
-rw-r--r--test cases/common/174 source in dep/bar.cpp4
-rw-r--r--test cases/common/174 source in dep/foo.c2
-rwxr-xr-xtest cases/common/174 source in dep/generated/genheader.py2
-rwxr-xr-xtest cases/common/175 generator link whole/generator.py4
-rw-r--r--test cases/common/175 generator link whole/pull_meson_test_function.c2
-rw-r--r--test cases/common/178 as-needed/main.cpp2
-rw-r--r--test cases/common/18 array/func.c2
-rw-r--r--test cases/common/18 array/prog.c2
-rw-r--r--test cases/common/183 bothlibraries/libfile.c2
-rw-r--r--test cases/common/183 bothlibraries/main.c2
-rw-r--r--test cases/common/184 escape and unicode/file.c.in2
-rw-r--r--test cases/common/184 escape and unicode/fun.c2
-rw-r--r--test cases/common/184 escape and unicode/main.c4
-rw-r--r--test cases/common/187 find override/otherdir/main.c2
-rw-r--r--test cases/common/187 find override/otherdir/main2.c2
-rwxr-xr-xtest cases/common/187 find override/subdir/converter.py2
-rwxr-xr-xtest cases/common/187 find override/subdir/gencodegen.py.in2
-rw-r--r--test cases/common/19 includedir/include/func.h2
-rw-r--r--test cases/common/19 includedir/src/func.c2
-rw-r--r--test cases/common/190 same target name/file.c2
-rw-r--r--test cases/common/190 same target name/sub/file2.c2
-rw-r--r--test cases/common/195 install_mode/stat.c2
-rw-r--r--test cases/common/2 cpp/trivial.cc2
-rw-r--r--test cases/common/200 generator in subdir/com/mesonbuild/genprog.py4
-rw-r--r--test cases/common/202 subproject with features/subprojects/disabled_sub/lib/sub.c2
-rw-r--r--test cases/common/202 subproject with features/subprojects/sub/lib/sub.c2
-rw-r--r--test cases/common/202 subproject with features/subprojects/sub/lib/sub.h2
-rw-r--r--test cases/common/206 install name_prefix name_suffix/libfile.c2
-rw-r--r--test cases/common/21 global arg/prog.c2
-rw-r--r--test cases/common/21 global arg/prog.cc2
-rw-r--r--test cases/common/212 native file path override/main.cpp2
-rwxr-xr-xtest cases/common/215 link custom/custom_stlib.py2
-rw-r--r--test cases/common/215 link custom/prog.c2
-rw-r--r--test cases/common/216 link custom_i single from multiple/prog.c2
-rw-r--r--test cases/common/217 link custom_i multiple from multiple/prog.c4
-rw-r--r--test cases/common/22 target arg/func.c2
-rw-r--r--test cases/common/22 target arg/func2.c2
-rw-r--r--test cases/common/22 target arg/prog.cc2
-rw-r--r--test cases/common/22 target arg/prog2.cc2
-rw-r--r--test cases/common/222 source set realistic example/main.cc2
-rw-r--r--test cases/common/223 custom target input extracted objects/libdir/source.c2
-rw-r--r--test cases/common/23 object extraction/lib.c2
-rw-r--r--test cases/common/23 object extraction/lib2.c2
-rw-r--r--test cases/common/23 object extraction/main.c2
-rw-r--r--test cases/common/23 object extraction/src/lib.c2
-rw-r--r--test cases/common/25 library versions/lib.c2
-rw-r--r--test cases/common/27 pipeline/depends/libsrc.c.in2
-rw-r--r--test cases/common/27 pipeline/depends/prog.c2
-rw-r--r--test cases/common/27 pipeline/input_src.dat2
-rw-r--r--test cases/common/27 pipeline/prog.c2
-rw-r--r--test cases/common/28 find program/source.in2
-rw-r--r--test cases/common/29 multiline string/meson.build2
-rw-r--r--test cases/common/3 static/libfile.c2
-rw-r--r--test cases/common/3 static/libfile2.c2
-rw-r--r--test cases/common/30 try compile/invalid.c2
-rw-r--r--test cases/common/30 try compile/meson.build4
-rw-r--r--test cases/common/30 try compile/valid.c2
-rw-r--r--test cases/common/32 sizeof/prog.c.in2
-rw-r--r--test cases/common/36 tryrun/error.c2
-rw-r--r--test cases/common/36 tryrun/meson.build6
-rw-r--r--test cases/common/36 tryrun/no_compile.c2
-rw-r--r--test cases/common/4 shared/libfile.c2
-rw-r--r--test cases/common/42 library chain/main.c2
-rw-r--r--test cases/common/42 library chain/subdir/lib1.c6
-rw-r--r--test cases/common/42 library chain/subdir/subdir2/lib2.c2
-rw-r--r--test cases/common/42 library chain/subdir/subdir3/lib3.c2
-rw-r--r--test cases/common/45 subproject/subprojects/sublib/include/subdefs.h2
-rw-r--r--test cases/common/45 subproject/subprojects/sublib/sublib.c2
-rw-r--r--test cases/common/47 pkgconfig-gen/dependencies/custom.c2
-rw-r--r--test cases/common/47 pkgconfig-gen/dependencies/exposed.c2
-rw-r--r--test cases/common/47 pkgconfig-gen/dependencies/internal.c2
-rw-r--r--test cases/common/47 pkgconfig-gen/simple.c2
-rw-r--r--test cases/common/47 pkgconfig-gen/simple.h2
-rw-r--r--test cases/common/49 subproject subproject/prog.c2
-rw-r--r--test cases/common/49 subproject subproject/subprojects/a/a.c4
-rw-r--r--test cases/common/49 subproject subproject/subprojects/b/b.c2
-rw-r--r--test cases/common/5 linkstatic/libfile.c2
-rw-r--r--test cases/common/5 linkstatic/libfile2.c2
-rw-r--r--test cases/common/5 linkstatic/libfile3.c2
-rw-r--r--test cases/common/5 linkstatic/libfile4.c2
-rw-r--r--test cases/common/5 linkstatic/main.c2
-rw-r--r--test cases/common/50 same file name/d1/file.c2
-rw-r--r--test cases/common/50 same file name/d2/file.c2
-rw-r--r--test cases/common/50 same file name/prog.c4
-rw-r--r--test cases/common/51 file grabber/a.c2
-rw-r--r--test cases/common/51 file grabber/b.c2
-rw-r--r--test cases/common/51 file grabber/c.c2
-rw-r--r--test cases/common/51 file grabber/prog.c6
-rw-r--r--test cases/common/51 file grabber/subdir/suba.c2
-rw-r--r--test cases/common/51 file grabber/subdir/subb.c2
-rw-r--r--test cases/common/51 file grabber/subdir/subc.c2
-rw-r--r--test cases/common/51 file grabber/subdir/subprog.c6
-rw-r--r--test cases/common/55 object generator/prog.c6
-rw-r--r--test cases/common/55 object generator/source.c2
-rw-r--r--test cases/common/55 object generator/source2.c2
-rw-r--r--test cases/common/55 object generator/source3.c2
-rwxr-xr-xtest cases/common/57 custom target source output/generator.py4
-rw-r--r--test cases/common/58 exe static shared/prog.c4
-rw-r--r--test cases/common/58 exe static shared/stat.c4
-rw-r--r--test cases/common/58 exe static shared/stat2.c2
-rw-r--r--test cases/common/58 exe static shared/subdir/shlib.c2
-rw-r--r--test cases/common/6 linkshared/cpplib.cpp2
-rw-r--r--test cases/common/6 linkshared/cppmain.cpp4
-rw-r--r--test cases/common/6 linkshared/libfile.c2
-rw-r--r--test cases/common/6 linkshared/main.c2
-rw-r--r--test cases/common/61 multiple generators/main.cpp2
-rw-r--r--test cases/common/7 mixed/func.c2
-rw-r--r--test cases/common/7 mixed/main.cc2
-rw-r--r--test cases/common/75 shared subproject/a.c4
-rw-r--r--test cases/common/75 shared subproject/subprojects/B/b.c4
-rw-r--r--test cases/common/75 shared subproject/subprojects/C/c.c2
-rw-r--r--test cases/common/76 shared subproject 2/a.c4
-rw-r--r--test cases/common/76 shared subproject 2/subprojects/B/b.c4
-rw-r--r--test cases/common/76 shared subproject 2/subprojects/C/c.c2
-rw-r--r--test cases/common/77 file object/lib.c2
-rw-r--r--test cases/common/77 file object/prog.c2
-rw-r--r--test cases/common/77 file object/subdir1/lib.c2
-rw-r--r--test cases/common/77 file object/subdir1/prog.c2
-rw-r--r--test cases/common/77 file object/subdir2/lib.c2
-rw-r--r--test cases/common/77 file object/subdir2/prog.c2
-rw-r--r--test cases/common/78 custom subproject dir/a.c4
-rw-r--r--test cases/common/78 custom subproject dir/custom_subproject_dir/B/b.c4
-rw-r--r--test cases/common/78 custom subproject dir/custom_subproject_dir/C/c.c2
-rw-r--r--test cases/common/8 install/stat.c2
-rw-r--r--test cases/common/80 extract from nested subdir/src/first/lib_first.c2
-rw-r--r--test cases/common/81 internal dependency/proj1/include/proj1.h6
-rw-r--r--test cases/common/81 internal dependency/proj1/proj1f1.c2
-rw-r--r--test cases/common/81 internal dependency/proj1/proj1f2.c2
-rw-r--r--test cases/common/81 internal dependency/proj1/proj1f3.c2
-rw-r--r--test cases/common/82 same basename/exe1.c2
-rw-r--r--test cases/common/82 same basename/exe2.c2
-rw-r--r--test cases/common/82 same basename/lib.c4
-rw-r--r--test cases/common/83 declare dep/entity/entity.h4
-rw-r--r--test cases/common/83 declare dep/entity/entity1.c2
-rw-r--r--test cases/common/83 declare dep/entity/entity2.c2
-rw-r--r--test cases/common/84 extract all/extractor.h8
-rw-r--r--test cases/common/84 extract all/four.c2
-rw-r--r--test cases/common/84 extract all/one.c2
-rw-r--r--test cases/common/84 extract all/three.c2
-rw-r--r--test cases/common/84 extract all/two.c2
-rwxr-xr-xtest cases/common/89 private include/stlib/compiler.py4
-rw-r--r--test cases/common/91 dep fallback/subprojects/boblib/bob.c2
-rw-r--r--test cases/common/91 dep fallback/subprojects/boblib/bob.h2
-rw-r--r--test cases/common/93 selfbuilt custom/mainprog.cpp2
-rw-r--r--test cases/common/94 gen extra/name.l2
-rw-r--r--test cases/common/94 gen extra/plain.c2
-rwxr-xr-xtest cases/common/94 gen extra/srcgen.py2
-rw-r--r--test cases/common/94 gen extra/upper.c2
-rw-r--r--test cases/common/98 threads/threadprog.c4
-rw-r--r--test cases/common/98 threads/threadprog.cpp6
-rwxr-xr-xtest cases/common/99 manygen/subdir/manygen.py10
214 files changed, 303 insertions, 303 deletions
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 068a5b89c..e748ac750 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 f1ab0e19d..2b59a3a32 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 6bdeda747..f3d0417ea 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 e917d2487..e5a0c1eab 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 68e6ab975..a7d7e77f9 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 7cec281f7..32e1261f1 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 068a5b89c..e748ac750 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 f1ab0e19d..2b59a3a32 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 b739df771..9cfaec4a2 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 9c8774dd9..5dd26d7ef 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 07eaab8fb..aac3cbfef 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 7f2ead174..19d5e944d 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 d0917a11b..cfb7ff6d6 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 5ca6696d9..f67a85e68 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 cfb01571d..152a1455d 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 c41004651..24604ed72 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 3ece5121f..800cd2dfb 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 dc468ec88..9841180d0 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 7779b332c..1dc08e168 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 29aad40f3..8024b9714 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 1580f1ed4..c4362c4d6 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 add185031..1170ee36a 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 12b790e05..124bba063 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 7fa6253d3..0ba8519dc 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 c02722e83..620eca133 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 fb8932e7e..432120329 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 c107b1ae1..6a971404d 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 12b790e05..124bba063 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 7c8544850..44e344f72 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 14fe9d622..6120d4889 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 305a575ac..094260e04 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 2abd08486..debb97ac6 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 e78a98ca7..0983aff17 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 7779b332c..1dc08e168 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 9c82659d8..bc3caf3e2 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 b2690a07f..161c5da1c 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 9e287a4db..4fe7150ff 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 813cc6783..79ce585ef 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 f5bc0b41a..643c24694 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 1c84dae35..5f45a4e2f 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 15297eb2b..c79819b75 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 528ed3c66..76054420b 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 20820992b..2834b3096 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 3c9fe622e..6014e0cc9 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 271022ed1..445afb631 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 89c2f8b1f..29a35e60f 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 859fb4366..29f25554a 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 edd6e5b44..f1564e2b9 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 0156f7720..fa557f4c1 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 c5e16583d..d820f2503 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 019f2bab1..267b43aa5 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 019f2bab1..267b43aa5 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 5b1208d92..7510a1b55 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 4c94ee95f..4d71c0f9d 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 eebfb9fba..facd19943 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 0c27f8431..fa1953e6b 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 d53846f52..a867b3237 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 d53846f52..a867b3237 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 35b21e0ce..cb0c02fcc 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 7ac3e5e57..f9848c136 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 a95651bc0..8c07177a6 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 5536c367a..27162c5e0 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 1e10998ee..a50642b56 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 bda8cb6ec..2ea623bf8 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 1ecfa8c79..c1be8d053 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 eafc07545..489db23d3 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 0076b7499..18a6cc2f5 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 c54dda6d7..23d24acf4 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 191d15c4d..a893431d4 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 741237235..a324dca21 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 51204b9d4..f794e1b1f 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 085ef3b87..f5e228ec1 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 9b6e39dd5..8237bae0a 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 413ed4297..5dd6e50fa 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 8eeb8ea00..c5634d836 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 34351259b..6137ad79c 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 b3c39c9e4..5fb6371b8 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 522fcbde4..80a30091e 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 ee2ff85a3..efe04649d 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 57d9c40b4..78ebb2f4e 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 29ebd0bb6..647b72fa2 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 193edbbc9..215beff8d 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 6f1c172d6..91800303c 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 a5e453d2f..3d1a1c323 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 fa76a658f..4825cefd2 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 c5ade7215..d3df47689 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 1e10998ee..a50642b56 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 068a5b89c..e748ac750 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 ed78306eb..768ed36d6 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 f1ab0e19d..2b59a3a32 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 44f7667d4..91489b287 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 9c4660b54..2a71236b6 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 9a18362ab..5c3220992 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 d65cab212..91bc80906 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 80334edc0..2e61ac979 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 2273b1d8a..efecbef34 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 46d10c78e..040672a42 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 2d626ef1b..7b0c5cfc8 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 9b3fe5d44..8c0659e96 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 d3e91a56c..1897cf7d2 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 4a3aa1fca..23028af4d 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 8158d1404..e2ffe62ad 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 97afab1be..2b552176b 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 7779b332c..1dc08e168 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 652f4eb13..81805512f 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 c30dde237..5020593c6 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 5536c367a..27162c5e0 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 652f4eb13..81805512f 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 10019dcc3..e49cb2d66 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 652f4eb13..81805512f 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 8bd6e03fc..54c40e162 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 741237235..a324dca21 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 7bd54d43b..128f2bb15 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 4cce7f667..03b2213bb 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 8ed153cae..9cec114d8 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 80a427b4a..846485eff 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 86bbb2c35..4df60c549 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 b623bf8ca..6c9cfb840 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 09ca395be..cb41e1d5a 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 3757f5a6b..f8e76f4ee 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 99432f7c8..44918ecc4 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 16db28eda..53ef08e03 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 6682a3385..261adf26a 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 b3b753c1a..496c2e837 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 daabb65d5..0797eecc4 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 775475588..9c88e73ae 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 499ef82bf..88436b27e 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 34fadf2a6..e788f0795 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 7bd88afdd..a99c64e66 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 681c7b890..6ae8462f6 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 c13326b85..f71564f14 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 2cc5651dd..1d3deca18 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 005202e67..caa45912e 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 1a41b11c8..23b07ecd4 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 e8a6d8330..ff86f3110 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 bb52e6d72..6896bfd17 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 5536c367a..27162c5e0 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 7ac3e5e57..f9848c136 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 a95651bc0..8c07177a6 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 6f1c172d6..91800303c 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 89780f593..5badf23bc 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 5e0d08bb9..4bfe52a32 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 3645c31f1..ce1fe6872 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 7bd54d43b..128f2bb15 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 8084d7351..46e51723b 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 d1444a24c..3d367f16e 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 61bc874de..1eee6c2f6 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 bee8ad7a1..8f63c2de5 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 0fdd16287..f38baca8c 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 63f951cad..2e8abbfc9 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 47ccc3037..ff55723e1 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 bee8ad7a1..8f63c2de5 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 0fdd16287..f38baca8c 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 63f951cad..2e8abbfc9 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 47ccc3037..ff55723e1 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 dc468ec88..9841180d0 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 7779b332c..1dc08e168 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 29aad40f3..8024b9714 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 1580f1ed4..c4362c4d6 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 3464b0a85..1bec8e855 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 3ba9a8fbe..6dba60d7c 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 680ed92b3..eddc4d816 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 4ae3775f7..4abb49ffd 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 002c83f92..dd9c6b2db 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 8b3e0d25a..395859d27 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 a7e27dbe9..8e1648515 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 44f7667d4..91489b287 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 81320e539..77773274e 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 82027c838..f1a01bd5f 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 9019a81d1..c76c23dbc 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 29c680fbf..9a7a7a65c 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 5b1208d92..7510a1b55 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 a1f3a5147..b8c7d83a1 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 eebfb9fba..facd19943 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 5b1208d92..7510a1b55 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 4c94ee95f..4d71c0f9d 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 eebfb9fba..facd19943 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 6f1c172d6..91800303c 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 e4a786cfa..78c6acc27 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 bc1e7b0a1..8c13c2126 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 1a09f7f7d..38d13d242 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 cfef4d074..8e2b4ebfb 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 558e5ee39..8a8f0d016 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 5b1208d92..7510a1b55 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 4c94ee95f..4d71c0f9d 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 eebfb9fba..facd19943 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 fa76a658f..4825cefd2 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 30049063f..5fc32678c 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 ded6f75c8..ecb1e4b6f 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 9077f4fa3..69fa823e1 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 374ee4eb7..7dd621c3a 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 8c8fca4bd..2861ddcf6 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 7bd54d43b..128f2bb15 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 6c47a9d76..d2d89956d 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 6fd432e50..b3798e99e 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 c695b141f..959a8c30d 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 204eb8b40..d124e24e8 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 f34f546f3..4e8bb07e1 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 d0917a11b..cfb7ff6d6 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 5ca6696d9..f67a85e68 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 cfb01571d..152a1455d 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 c41004651..24604ed72 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 3ece5121f..800cd2dfb 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 98dbe46fa..c8597ddc1 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 ae0f394d5..52cf4795e 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 f874ae7c1..8dd4b334d 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 62550281d..bb45dcae8 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 3adda4f7b..c4ba277d2 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 6fc3d2282..c068a023e 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 8988cd92f..c64f54000 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 f216dce94..82c32529e 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 789f24be0..7bfb7c444 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 18fa9f546..3c69dc3a8 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 0fbc2ec0b..d46b2a819 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)