Skip to content

Commit af4d786

Browse files
committed
meson: avoid warning about comparison of bool and string
meson.build:2907: WARNING: Trying to compare values of different types (bool, str) using ==. The result of this is undefined and will become a hard error in a future Meson release.
1 parent f83f8c7 commit af4d786

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

meson.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,8 +2903,9 @@ foreach tuple : [
29032903
['debug mmap cache'],
29042904
]
29052905

2906-
cond = tuple.get(1, '')
2907-
if cond == ''
2906+
if tuple.length() >= 2
2907+
cond = tuple[1]
2908+
else
29082909
ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
29092910
ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
29102911
cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1

0 commit comments

Comments
 (0)