From: Yu Watanabe Date: Thu, 26 Apr 2018 08:53:10 +0000 (+0900) Subject: meson: drop 'name' argument in cc.has_argument() (#8823) X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a7803239f6da32aadca17593178ee24f06be6168;p=elogind.git meson: drop 'name' argument in cc.has_argument() (#8823) This fixes the following warning with clang and meson-0.46.0, ``` WARNING: Passed invalid keyword argument "name". WARNING: This will become a hard error in the future. WARNING: Passed invalid keyword argument "name". WARNING: This will become a hard error in the future. Compiler for C supports arguments -Wno-typedef-redefinition: YES WARNING: Passed invalid keyword argument "name". WARNING: This will become a hard error in the future. WARNING: Passed invalid keyword argument "name". WARNING: This will become a hard error in the future. Compiler for C supports arguments -Wno-gnu-variable-sized-type-not-at-end: YES ``` (cherry picked from commit 8ac42236b09d2f21f962bf72fcbeee24502f959f) --- diff --git a/meson.build b/meson.build index 78d458560..aa1234a14 100644 --- a/meson.build +++ b/meson.build @@ -457,8 +457,7 @@ if cc.get_id() == 'clang' foreach arg : ['-Wno-typedef-redefinition', '-Wno-gnu-variable-sized-type-not-at-end', ] - if cc.has_argument(arg, - name : '@0@ is supported'.format(arg)) + if cc.has_argument(arg) add_project_arguments(arg, language : 'c') endif endforeach