summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-06-07 20:27:18 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2020-06-07 20:27:18 +0300
commit86df85d511c8a6c92da248372b47522d0a7e1aec (patch)
treeceedf79859e340b140fa4becfd95dec64d090059
parentfd0ad977a6983a01415f103a2e3dfe53b22cb5a3 (diff)
downloadmeson-newlines.tar.gz
Remove warnings from sample code. Closes #7248.newlines
-rw-r--r--mesonbuild/compilers/mixins/clike.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 1bbe6986a..b088fde2b 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -1108,7 +1108,7 @@ class CLikeCompiler:
'the compiler you are using. has_link_argument or '
'other similar method can be used instead.'
.format(arg))
- code = 'int i;\n'
+ code = 'extern int i;\nint i;\n'
return self.has_arguments(args, env, code, mode='compile')
def has_multi_link_arguments(self, args, env):