]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
build: avoid unused static inline function warning for clang
authorDaniel Wagner <dwagner@suse.de>
Thu, 31 Aug 2023 11:07:11 +0000 (13:07 +0200)
committerDaniel Wagner <wagi@monom.org>
Thu, 31 Aug 2023 11:31:54 +0000 (13:31 +0200)
clang reports unused static inline fuctions. Just disable this
warning.

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

index af79bd4d8f1ef2255a3d2c20acd6fd326ae09840..bdada6465173cc31ee3367052178a7742c28e04e 100644 (file)
@@ -157,6 +157,11 @@ conf.set10(
     ),
     description: 'Is sys/random.h(getrandom) include-able?'
 )
+conf.set10(
+    'HAVE_ATTRIBUTE_UNUSED',
+    cc.get_id() == 'clang',
+    description: 'Is compiler warning about unused static line function?'
+)
 
 if cc.has_function_attribute('fallthrough')
   conf.set('fallthrough', '__attribute__((__fallthrough__))')