diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-11-08 16:22:40 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-11-08 16:22:40 +0530 |
commit | f144e50f5ca65ba67c23ff262a79c35a2c444006 (patch) | |
tree | 7a7ace45d93839776a08090a56b1663f93e829b9 /mesonbuild/compilers.py | |
parent | 1e1abc675e703ab82c51da63457b63fbbdfbce70 (diff) | |
download | meson-f144e50f5ca65ba67c23ff262a79c35a2c444006.zip meson-f144e50f5ca65ba67c23ff262a79c35a2c444006.tar.gz meson-f144e50f5ca65ba67c23ff262a79c35a2c444006.tar.bz2 |
has_function: Cast to void* instead of int
Clang++ doesn't allow that, but void* will always be allowed because
lots of projects depend on that.
error: cast from pointer to smaller type 'int' loses information
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 9b6ad8c..53d298a 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -930,7 +930,7 @@ int main(int argc, char **argv) { head = '#include <limits.h>\n{0}\n' # We don't know what the function takes or returns, so try to use it as # a function pointer - main = '\nint main() {{ int a = (int) &{1}; }}' + main = '\nint main() {{ void *a = (void*) &{1}; }}' return head, main def has_function(self, funcname, prefix, env, extra_args=None, dependencies=None): |