[glib] gtypes.h: move G_STATIC_ASSERT to function scope
- From: Allison Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gtypes.h: move G_STATIC_ASSERT to function scope
- Date: Fri, 27 Nov 2015 16:29:02 +0000 (UTC)
commit ec6971b864a3faffadd0bf4a87c7c1b47697fc83
Author: Allison Ryan Lortie <desrt desrt ca>
Date: Fri Nov 27 11:27:51 2015 -0500
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gtypes.h b/glib/gtypes.h
index 8575052..c20217b 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]