From 2c8cab3670b6dfe4591ac0a4dbb3c9e30ed33356 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 7 Sep 2021 10:46:08 +0200 Subject: [PATCH] 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. --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 4d09cfe7..c33f5fd7 100644 --- a/meson.build +++ b/meson.build @@ -82,6 +82,8 @@ cc_args = cc.get_supported_arguments([ '-Wno-cast-function-type', # all message protocol structs are packed, never complain about it '-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 @@ -94,7 +96,6 @@ if get_option('buildtype').contains('debug') '-Wdouble-promotion', '-Wduplicated-branches', '-Wduplicated-cond', - '-Wfloat-equal', '-Wformat=2', '-Wformat-nonliteral', '-Wformat-security',