[gobject-introspection/warn-flags] build: enable -Wdouble-promotion
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/warn-flags] build: enable -Wdouble-promotion
- Date: Sun, 29 Jul 2018 13:04:25 +0000 (UTC)
commit 666dfabfdabd8fb802f84004d9cb6cf1ab4598da
Author: Christoph Reiter <reiter christoph gmail com>
Date: Sun Jul 29 14:54:34 2018 +0200
build: enable -Wdouble-promotion
configure.ac | 2 +-
girepository/girwriter.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6898741a..91a56251 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,7 @@ AX_COMPILER_FLAGS(,, [yes])
AX_APPEND_COMPILE_FLAGS([-Wno-switch-enum])
# FIXME: Fix the warnings and remove the flags
AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls -Wno-switch-default -Wno-shadow -Wno-deprecated-declarations
-Wno-cast-function-type -Wno-type-limits])
-AX_APPEND_COMPILE_FLAGS([-Wno-duplicated-branches -Wno-implicit-fallthrough -Wno-suggest-attribute=format
-Wno-double-promotion -Wno-sign-compare])
+AX_APPEND_COMPILE_FLAGS([-Wno-duplicated-branches -Wno-implicit-fallthrough -Wno-suggest-attribute=format
-Wno-sign-compare])
AX_APPEND_COMPILE_FLAGS([-Wno-old-style-definition -Wno-strict-prototypes])
WARN_CFLAGS_PYTHON="$WARN_CFLAGS"
diff --git a/girepository/girwriter.c b/girepository/girwriter.c
index dacce86f..1b61de03 100644
--- a/girepository/girwriter.c
+++ b/girepository/girwriter.c
@@ -748,7 +748,7 @@ write_constant_value (const gchar *namespace,
xml_printf (file, "%" G_GUINT64_FORMAT, value->v_uint64);
break;
case GI_TYPE_TAG_FLOAT:
- xml_printf (file, "%f", value->v_float);
+ xml_printf (file, "%f", (double)value->v_float);
break;
case GI_TYPE_TAG_DOUBLE:
xml_printf (file, "%f", value->v_double);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]