From: Tim-Philipp Müller Date: Fri, 30 Dec 2011 12:59:46 +0000 (+0000) Subject: math-compat: move static variable for NAN into #ifndef NAN block X-Git-Tag: RELEASE-0.11.2~262 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f7df5abac92c77b2ac49373d19e2307775e5719;p=platform%2Fupstream%2Fgstreamer.git math-compat: move static variable for NAN into #ifndef NAN block And use G_GNUC_UNUSED instead of __attribute_used__ --- diff --git a/gst/math-compat.h b/gst/math-compat.h index 8ad1c25..aa123db 100644 --- a/gst/math-compat.h +++ b/gst/math-compat.h @@ -79,21 +79,18 @@ __gst_math_compat_rintf (float x) #define rintf(x) __gst_math_compat_rintf(x) #endif +#ifndef NAN #if G_BYTE_ORDER == G_BIG_ENDIAN -#define __gst_nan_bytes { 0x7f, 0xc0, 0, 0 } -#endif -#if G_BYTE_ORDER == G_LITTLE_ENDIAN -#define __gst_nan_bytes { 0, 0, 0xc0, 0x7f } +#define __GST_NAN_BYTES { 0x7f, 0xc0, 0, 0 } +#elif G_BYTE_ORDER == G_LITTLE_ENDIAN +#define __GST_NAN_BYTES { 0, 0, 0xc0, 0x7f } #endif - static union { unsigned char __c[4]; float __d; -} __gst_nan_union __attribute_used__ = { - __gst_nan_bytes +} __gst_nan_union G_GNUC_UNUSED = { + __GST_NAN_BYTES }; - -#ifndef NAN #define NAN (__gst_nan_union.__d) #endif