diff options
author | Michael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com> | 2019-07-16 07:24:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 07:24:30 -0400 |
commit | 1b2d54a0856eb5dea9cc214b7215d4f7f6d749dd (patch) | |
tree | 68e9ec47a07f15942a494b73b8767109ef13f2fe | |
parent | 6bf71e816bf1a524b2f7edb27345e3f3c4d3cc90 (diff) | |
parent | c1870889b13b9284867d2c544822cb0a12f62123 (diff) | |
download | meson-1b2d54a0856eb5dea9cc214b7215d4f7f6d749dd.zip meson-1b2d54a0856eb5dea9cc214b7215d4f7f6d749dd.tar.gz meson-1b2d54a0856eb5dea9cc214b7215d4f7f6d749dd.tar.bz2 |
Merge pull request #5654 from marxin/fix-return-type-warnings
Fix missing return statements that are seen with -Werror=return-type.
-rw-r--r-- | mesonbuild/compilers/c.py | 1 | ||||
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 47cfd98..eff7161 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -67,6 +67,7 @@ class CCompiler(CLikeCompiler, Compiler): #ifndef {symbol} {symbol}; #endif + return 0; }}''' return self.compiles(t.format(**fargs), env, extra_args=extra_args, dependencies=dependencies) diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index e032402..0591b7f 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -332,6 +332,7 @@ class CLikeCompiler: #ifndef {symbol} {symbol}; #endif + return 0; }}''' return self.compiles(t.format(**fargs), env, extra_args=extra_args, dependencies=dependencies) @@ -555,6 +556,7 @@ class CLikeCompiler: {prefix} int main() {{ {type} something; + return 0; }}''' if not self.compiles(t.format(**fargs), env, extra_args=extra_args, dependencies=dependencies)[0]: @@ -633,6 +635,7 @@ class CLikeCompiler: #include <stdio.h> int main() {{ printf ("{fmt}", {cast} {f}()); + return 0; }}'''.format(**fargs) res = self.run(code, env, extra_args=extra_args, dependencies=dependencies) if not res.compiled: @@ -785,6 +788,7 @@ class CLikeCompiler: #error "No definition for __builtin_{func} found in the prefix" #endif #endif + return 0; }}''' return self.links(t.format(**fargs), env, extra_args=extra_args, dependencies=dependencies) |