gfx/skia/patches/0023-Bug-890539-Fix-SK_COMPILE_ASSERT-build-warning.patch

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 # HG changeset patch
     2 # Parent e378875000890099fffcdb4cbc4ab12828ac34ee
     3 # User Daniel Holbert <dholbert@cs.stanford.edu>
     4 Bug 890539: Annotate SK_COMPILE_ASSERT's typedef as permissibly unused, to fix GCC 4.8 build warning. r=gw280
     6 diff --git a/gfx/skia/include/core/SkTypes.h b/gfx/skia/include/core/SkTypes.h
     7 --- a/gfx/skia/include/core/SkTypes.h
     8 +++ b/gfx/skia/include/core/SkTypes.h
     9 @@ -121,18 +121,29 @@ inline void operator delete(void* p) {
    10      #define SkDEVCODE(code)
    11      #define SK_DEVELOPER_TO_STRING()
    12  #endif
    14  template <bool>
    15  struct SkCompileAssert {
    16  };
    18 +/*
    19 + * The SK_COMPILE_ASSERT definition creates an otherwise-unused typedef.  This
    20 + * triggers compiler warnings with some versions of gcc, so mark the typedef
    21 + * as permissibly-unused to disable the warnings.
    22 + */
    23 +#  if defined(__GNUC__)
    24 +#    define SK_COMPILE_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
    25 +#  else
    26 +#    define SK_COMPILE_ASSERT_UNUSED_ATTRIBUTE /* nothing */
    27 +#  endif
    28 +
    29  #define SK_COMPILE_ASSERT(expr, msg) \
    30 -    typedef SkCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
    31 +    typedef SkCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] SK_COMPILE_ASSERT_UNUSED_ATTRIBUTE
    33  /*
    34   *  Usage:  SK_MACRO_CONCAT(a, b)   to construct the symbol ab
    35   *
    36   *  SK_MACRO_CONCAT_IMPL_PRIV just exists to make this work. Do not use directly
    37   *
    38   */
    39  #define SK_MACRO_CONCAT(X, Y)           SK_MACRO_CONCAT_IMPL_PRIV(X, Y)

mercurial