aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
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 /mesonbuild/compilers/c.py
parent0435691e83fb7172e2a9635d2eb32d5521089916 (diff)
downloadmeson-83b4e981c4dd8b8ea521a6150a34636d10a67211.zip
meson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.gz
meson-83b4e981c4dd8b8ea521a6150a34636d10a67211.tar.bz2
Use strict function prototypes
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 7c46627..db7abf0 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -59,14 +59,14 @@ class CCompiler(CLikeCompiler, Compiler):
return ['-nostdinc']
def sanity_check(self, work_dir, environment):
- code = 'int main() { int class=0; return class; }\n'
+ code = 'int main(void) { int class=0; return class; }\n'
return self.sanity_check_impl(work_dir, environment, 'sanitycheckc.c', code)
def has_header_symbol(self, hname, symbol, prefix, env, *, extra_args=None, dependencies=None):
fargs = {'prefix': prefix, 'header': hname, 'symbol': symbol}
t = '''{prefix}
#include <{header}>
- int main () {{
+ int main(void) {{
/* If it's not defined as a macro, try to use as a symbol */
#ifndef {symbol}
{symbol};