From ec6971b864a3faffadd0bf4a87c7c1b47697fc83 Mon Sep 17 00:00:00 2001 From: Allison Ryan Lortie Date: Fri, 27 Nov 2015 11:27:51 -0500 Subject: [PATCH] gtypes.h: move G_STATIC_ASSERT to function scope It seems that some compilers get upset if this is done at global scope, so let's move it to function scope where we know it works. --- glib/gtypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gtypes.h b/glib/gtypes.h index 8575052aa..c20217be3 100644 --- a/glib/gtypes.h +++ b/glib/gtypes.h @@ -419,8 +419,8 @@ static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) { return !__builtin_umul_overflow(a, b, dest); } static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) { - return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); } G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); + return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); } static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) { return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); } #else