Annotate SK_COMPILE_ASSERT's typedef as permissibly unused, to fix GCC 4.8 build warning. Patch originally by dholbert.
R=bsalomon@google.com Review URL: https://codereview.chromium.org/22285002 git-svn-id: http://skia.googlecode.com/svn/trunk@10575 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
fedc4f9f43
commit
5ebbbe5377
@ -63,6 +63,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(SK_ATTRIBUTE)
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#define SK_ATTRIBUTE(attr) __attribute__((attr))
|
||||
#else
|
||||
#define SK_ATTRIBUTE(attr)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(SK_SUPPORT_GPU)
|
||||
#define SK_SUPPORT_GPU 1
|
||||
#endif
|
||||
@ -354,6 +362,12 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(SK_UNUSED)
|
||||
#define SK_UNUSED SK_ATTRIBUTE(unused)
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SK_PRINTF_LIKE
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B))))
|
||||
|
@ -127,7 +127,7 @@ struct SkCompileAssert {
|
||||
};
|
||||
|
||||
#define SK_COMPILE_ASSERT(expr, msg) \
|
||||
typedef SkCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
|
||||
typedef SkCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] SK_UNUSED
|
||||
|
||||
/*
|
||||
* Usage: SK_MACRO_CONCAT(a, b) to construct the symbol ab
|
||||
|
Loading…
Reference in New Issue
Block a user