aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-06-30 14:00:38 +0100
committerDylan Baker <dylan@pnwbakers.com>2022-06-30 09:55:48 -0700
commitf0e9a44d41e2040e14dbd07a288654415c6b595a (patch)
tree10e112b182e369d82c6a857d35c5d9c805d50987
parente06dd48ad2556f71ae639b877058cf6d13153d78 (diff)
downloadmeson-f0e9a44d41e2040e14dbd07a288654415c6b595a.zip
meson-f0e9a44d41e2040e14dbd07a288654415c6b595a.tar.gz
meson-f0e9a44d41e2040e14dbd07a288654415c6b595a.tar.bz2
test cases: Don't fall off the end of main() without an exit status
This is undefined behaviour, and seems to have caused test failures when backporting Meson to an older toolchain in the Steam Runtime. Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--test cases/common/141 special characters/arg-char-test.c1
-rw-r--r--test cases/common/141 special characters/arg-string-test.c1
-rw-r--r--test cases/common/141 special characters/arg-unquoted-test.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/test cases/common/141 special characters/arg-char-test.c b/test cases/common/141 special characters/arg-char-test.c
index 04e02f8..044857e 100644
--- a/test cases/common/141 special characters/arg-char-test.c
+++ b/test cases/common/141 special characters/arg-char-test.c
@@ -7,4 +7,5 @@ int main(int argc, char **argv) {
if (c != argv[1][0])
fprintf(stderr, "Expected %x, got %x\n", (unsigned int) c, (unsigned int) argv[1][0]);
assert(c == argv[1][0]);
+ return 0;
}
diff --git a/test cases/common/141 special characters/arg-string-test.c b/test cases/common/141 special characters/arg-string-test.c
index 199fd79..1d93f45 100644
--- a/test cases/common/141 special characters/arg-string-test.c
+++ b/test cases/common/141 special characters/arg-string-test.c
@@ -9,4 +9,5 @@ int main(int argc, char **argv) {
if (s[0] != argv[1][0])
fprintf(stderr, "Expected %x, got %x\n", (unsigned int) s[0], (unsigned int) argv[1][0]);
assert(s[0] == argv[1][0]);
+ return 0;
}
diff --git a/test cases/common/141 special characters/arg-unquoted-test.c b/test cases/common/141 special characters/arg-unquoted-test.c
index 7f679ca..9c51bff 100644
--- a/test cases/common/141 special characters/arg-unquoted-test.c
+++ b/test cases/common/141 special characters/arg-unquoted-test.c
@@ -14,4 +14,5 @@ int main(int argc, char **argv) {
assert(s[0] == argv[1][0]);
// There is no way to convert a macro argument into a character constant.
// Otherwise we'd test that as well
+ return 0;
}