From e004d5f397eb5a85b39273dbe578be99ea66d92f Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Wed, 20 Jun 2018 23:03:21 -0700 Subject: [PATCH 1/2] build: Look for copied Objective-C files in builddir Without this, the build fails in the OS_COCOA case due to not finding gnextstepsettingsbackend.c in $(srcdir). --- gio/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gio/Makefile.am b/gio/Makefile.am index 8a70bf98c..24651e5cf 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -627,13 +627,13 @@ libgio_objc_2_0_la_CFLAGS = $(libgio_2_0_la_CFLAGS) -xobjective-c libgio_objc_2_0_la_CPPFLAGS = $(libgio_2_0_la_CPPFLAGS) libgio_objc_2_0_la_LDFLAGS = $(libgio_2_0_la_LDFLAGS) -Wl,-framework,Foundation -Wl,-framework,AppKit libgio_objc_2_0_la_SOURCES = \ - gnextstepsettingsbackend.c \ - gosxcontenttype.c \ - gosxappinfo.c \ - gosxappinfo.h + $(abs_builddir)/gnextstepsettingsbackend.c \ + $(abs_builddir)/gosxcontenttype.c \ + $(abs_builddir)/gosxappinfo.c \ + $(abs_builddir)/gosxappinfo.h if MAC_OS_X_9 libgio_objc_2_0_la_SOURCES += \ - gcocoanotificationbackend.c + $(abs_builddir)/gcocoanotificationbackend.c endif noinst_LTLIBRARIES += libgio-objc-2.0.la From 9e46b2ef113dc6e667a51b10042795f3036fdd86 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Thu, 21 Jun 2018 00:20:55 -0700 Subject: [PATCH 2/2] gtester: Explicitly convert arguments of g_assert_cmpfloat() Using g_assert_cmpfloat() with a float or double causes warnings on the newest Clang version, because the macro internally promotes all values to a long double, which Clang warns about. Casting explicitly removes the warning. Closes: #1377 --- glib/gtestutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gtestutils.h b/glib/gtestutils.h index 02ab397b3..b247f2f3a 100644 --- a/glib/gtestutils.h +++ b/glib/gtestutils.h @@ -64,7 +64,7 @@ typedef void (*GTestFixtureFunc) (gpointer fixture, #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'x'); \ } G_STMT_END #define g_assert_cmpfloat(n1,cmp,n2) G_STMT_START { \ - long double __n1 = (n1), __n2 = (n2); \ + long double __n1 = (long double) (n1), __n2 = (long double) (n2); \ if (__n1 cmp __n2) ; else \ g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'f'); \