Bug 1247301 - Fix false positive warning in Brotli. r=mcmanus

This commit is contained in:
Frédéric Wang 2016-02-25 20:08:49 +01:00
parent a387f5b592
commit d8c56d4552
2 changed files with 8 additions and 4 deletions

View File

@ -15,3 +15,7 @@ The in-tree copy is updated by running
from within the modules/brotli directory. from within the modules/brotli directory.
Current version: [commit 33aa40220b96cf95ad2b9ba61dc8d7fd2f964f2c]. Current version: [commit 33aa40220b96cf95ad2b9ba61dc8d7fd2f964f2c].
dec/port.h was patched to fix false positive warning in Brotli and a
corresponding change will be done upstream.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1247301

View File

@ -125,9 +125,9 @@ OR:
/* IS_CONSTANT macros returns true for compile-time constant expressions. */ /* IS_CONSTANT macros returns true for compile-time constant expressions. */
#if BROTLI_MODERN_COMPILER || __has_builtin(__builtin_constant_p) #if BROTLI_MODERN_COMPILER || __has_builtin(__builtin_constant_p)
#define IS_CONSTANT(x) __builtin_constant_p(x) #define IS_CONSTANT(x) (!!__builtin_constant_p(x))
#else #else
#define IS_CONSTANT(x) 0 #define IS_CONSTANT(x) (!!0)
#endif #endif
#if BROTLI_MODERN_COMPILER || __has_attribute(always_inline) #if BROTLI_MODERN_COMPILER || __has_attribute(always_inline)
@ -213,9 +213,9 @@ static BROTLI_INLINE unsigned BrotliRBit(unsigned input) {
#endif /* gcc || clang */ #endif /* gcc || clang */
#if defined(BROTLI_TARGET_ARM) #if defined(BROTLI_TARGET_ARM)
#define BROTLI_HAS_UBFX 1 #define BROTLI_HAS_UBFX (!!1)
#else #else
#define BROTLI_HAS_UBFX 0 #define BROTLI_HAS_UBFX (!!0)
#endif #endif
#define BROTLI_ALLOC(S, L) S->alloc_func(S->memory_manager_opaque, L) #define BROTLI_ALLOC(S, L) S->alloc_func(S->memory_manager_opaque, L)