From: Daniel Wagner Date: Wed, 16 Nov 2022 11:06:03 +0000 (+0100) Subject: build: Drop meson version test for 0.48 X-Git-Tag: v1.3~29^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9fe6f05e4a68b2b259ed463f618896573077c2df;p=users%2Fsagi%2Flibnvme.git build: Drop meson version test for 0.48 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 --- diff --git a/meson.build b/meson.build index fb886d3a..d40313a4 100644 --- a/meson.build +++ b/meson.build @@ -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 */')