summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangjin Lee <lsj119@samsung.com>2017-06-09 11:16:15 +0900
committerSung-Jin Park <sj76.park@samsung.com>2020-02-21 16:56:57 +0900
commit169dc786fd977325a2a36116b884e8ce2f286d4a (patch)
tree83049d9bdddfa5a872f195d6dd944018219f72e8
parentfec482bac7208bf523d9d03a3bda30bee9dbd827 (diff)
downloadpixman-169dc786fd977325a2a36116b884e8ce2f286d4a.tar.gz
pixman-169dc786fd977325a2a36116b884e8ce2f286d4a.tar.bz2
pixman-169dc786fd977325a2a36116b884e8ce2f286d4a.zip
Fix build warning
__force_align_arg_pointer__ is an x86-only attribute, and gcc/clang warns on unused attributes. Don't use this on ARM or AMD64. __has_attribute can detect the presence of the attribute but is currently only supported by clang Change-Id: I3f792a7c8b6b7c2f0cfae242c21239fedea6133e
-rw-r--r--pixman/pixman-glyph.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pixman/pixman-glyph.c b/pixman/pixman-glyph.c
index 96a349a..470b5ef 100644
--- a/pixman/pixman-glyph.c
+++ b/pixman/pixman-glyph.c
@@ -43,6 +43,14 @@ typedef struct glyph_t glyph_t;
#define HASH_SIZE (2 * N_GLYPHS_HIGH_WATER)
#define HASH_MASK (HASH_SIZE - 1)
+#if defined(__has_attribute)
+#define HAS_FORCE_ALIGN_ARG_POINTER __has_attribute(__force_align_arg_pointer__)
+#elif defined(_GNUC_) && define(__i386__)
+#define HAS_FORCE_ALIGN_ARG_POINTER 1
+#else
+#define HAS_FORCE_ALIGN_ARG_POINTER 0
+#endif
+
struct glyph_t
{
void * font_key;
@@ -391,7 +399,7 @@ box32_intersect (pixman_box32_t *dest,
return dest->x2 > dest->x1 && dest->y2 > dest->y1;
}
-#if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+#if HAS_FORCE_ALIGN_ARG_POINTER
__attribute__((__force_align_arg_pointer__))
#endif
PIXMAN_EXPORT void
@@ -633,7 +641,7 @@ out:
* - Trim the mask to the destination clip/image?
* - Trim composite region based on sources, when the op ignores 0s.
*/
-#if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+#if HAS_FORCE_ALIGN_ARG_POINTER
__attribute__((__force_align_arg_pointer__))
#endif
PIXMAN_EXPORT void