]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
build: Drop meson version test for 0.48
authorDaniel Wagner <dwagner@suse.de>
Wed, 16 Nov 2022 11:06:03 +0000 (12:06 +0100)
committerDaniel Wagner <dwagner@suse.de>
Wed, 16 Nov 2022 11:06:03 +0000 (12:06 +0100)
With db8024d88198 ("build: require meson 0.50.0+") we don't need to
test the meson version for the fall through compiler feature.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
meson.build

index fb886d3a62c7c16d4e500f50ae0f3f097f143f66..d40313a4d5493608b95a7e9163e33a16d1209cca 100644 (file)
@@ -180,24 +180,7 @@ conf.set10(
     description: 'Is linux/mctp.h include-able?'
 )
 
-if meson.version().version_compare('>= 0.48')
-  has_fallthrough = cc.has_function_attribute('fallthrough')
-else
-  has_fallthrough = cc.compiles(
-    '''int main(int argc, char **argv) {
-           switch(argc) {
-               case 0:
-                   __attribute__((__fallthrough__));
-               case 1:
-                   return 1;
-           }
-           return 0;
-       }
-    ''',
-    name: 'has fallthrough')
-endif
-
-if has_fallthrough
+if cc.has_function_attribute('fallthrough')
   conf.set('fallthrough', '__attribute__((__fallthrough__))')
 else
   conf.set('fallthrough', 'do {} while (0) /* fallthrough */')