aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/13 pch
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/13 pch
parent0435691e83fb7172e2a9635d2eb32d5521089916 (diff)
downloadmeson-83b4e981c4dd8b8ea521a6150a34636d10a67211.zip
meson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.gz
meson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.bz2
Use strict function prototypes
Diffstat (limited to 'test cases/common/13 pch')
-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
6 files changed, 9 insertions, 9 deletions
diff --git a/test cases/common/13 pch/c/prog.c b/test cases/common/13 pch/c/prog.c
index 12b790e..124bba0 100644
--- a/test cases/common/13 pch/c/prog.c
+++ b/test cases/common/13 pch/c/prog.c
@@ -1,6 +1,6 @@
// No includes here, they need to come from the PCH
-void func() {
+void func(void) {
fprintf(stdout, "This is a function that fails if stdio is not #included.\n");
}
diff --git a/test cases/common/13 pch/cpp/prog.cc b/test cases/common/13 pch/cpp/prog.cc
index 7fa6253..0ba8519 100644
--- a/test cases/common/13 pch/cpp/prog.cc
+++ b/test cases/common/13 pch/cpp/prog.cc
@@ -1,11 +1,11 @@
// Note: if using PGI compilers, you will need to add #include "prog.hh"
// even though you're using precompiled headers.
-void func() {
+void func(void) {
std::cout << "This is a function that fails to compile if iostream is not included."
<< std::endl;
}
-int main() {
+int main(void) {
func();
return 0;
}
diff --git a/test cases/common/13 pch/mixed/func.c b/test cases/common/13 pch/mixed/func.c
index c02722e..620eca1 100644
--- a/test cases/common/13 pch/mixed/func.c
+++ b/test cases/common/13 pch/mixed/func.c
@@ -1,7 +1,7 @@
-void tmp_func() {
+void tmp_func(void) {
fprintf(stdout, "This is a function that fails if stdio is not #included.\n");
}
-int cfunc() {
+int cfunc(void) {
return 0;
}
diff --git a/test cases/common/13 pch/mixed/main.cc b/test cases/common/13 pch/mixed/main.cc
index fb8932e..4321203 100644
--- a/test cases/common/13 pch/mixed/main.cc
+++ b/test cases/common/13 pch/mixed/main.cc
@@ -1,10 +1,10 @@
extern "C" int cfunc();
-void func() {
+void func(void) {
std::cout << "This is a function that fails to compile if iostream is not included."
<< std::endl;
}
-int main() {
+int main(void) {
return cfunc();
}
diff --git a/test cases/common/13 pch/userDefined/pch/pch.c b/test cases/common/13 pch/userDefined/pch/pch.c
index c107b1a..6a97140 100644
--- a/test cases/common/13 pch/userDefined/pch/pch.c
+++ b/test cases/common/13 pch/userDefined/pch/pch.c
@@ -1,5 +1,5 @@
#include "pch.h"
-int foo() {
+int foo(void) {
return 0;
}
diff --git a/test cases/common/13 pch/withIncludeDirectories/prog.c b/test cases/common/13 pch/withIncludeDirectories/prog.c
index 12b790e..124bba0 100644
--- a/test cases/common/13 pch/withIncludeDirectories/prog.c
+++ b/test cases/common/13 pch/withIncludeDirectories/prog.c
@@ -1,6 +1,6 @@
// No includes here, they need to come from the PCH
-void func() {
+void func(void) {
fprintf(stdout, "This is a function that fails if stdio is not #included.\n");
}