build,meson: disable float comparison warnings

We have several symbols defined as floating point numbers that
identify "unknown" values, e.g. MM_LOCATION_LONGITUDE_UNKNOWN. We want
to be able to compare with those values directly, even if they're
floats.
This commit is contained in:
Aleksander Morgado
2021-09-07 10:46:08 +02:00
parent 2bb699fc96
commit 2c8cab3670

View File

@@ -82,6 +82,8 @@ cc_args = cc.get_supported_arguments([
'-Wno-cast-function-type', '-Wno-cast-function-type',
# all message protocol structs are packed, never complain about it # all message protocol structs are packed, never complain about it
'-Wno-packed', '-Wno-packed',
# we use some floating point ids as unknown, so we want to compare with them
'-Wno-float-equal',
]) ])
# strict flags to use in debug builds # strict flags to use in debug builds
@@ -94,7 +96,6 @@ if get_option('buildtype').contains('debug')
'-Wdouble-promotion', '-Wdouble-promotion',
'-Wduplicated-branches', '-Wduplicated-branches',
'-Wduplicated-cond', '-Wduplicated-cond',
'-Wfloat-equal',
'-Wformat=2', '-Wformat=2',
'-Wformat-nonliteral', '-Wformat-nonliteral',
'-Wformat-security', '-Wformat-security',