Skip to content

Commit

Permalink
Bug 1012218 - Cherrypick clang warning fixes from upstream harfbuzz. …
Browse files Browse the repository at this point in the history
…r=jfkthame
  • Loading branch information
cpeterso committed May 17, 2014
1 parent 84e89d2 commit 591364d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions gfx/harfbuzz/src/hb-common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ struct hb_language_item_t {

static hb_language_item_t *langs;

#ifdef HAVE_ATEXIT
static inline
void free_langs (void)
{
Expand All @@ -244,6 +245,7 @@ void free_langs (void)
langs = next;
}
}
#endif

static hb_language_item_t *
lang_find_or_insert (const char *key)
Expand Down
6 changes: 3 additions & 3 deletions gfx/harfbuzz/src/hb-private.hh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ _hb_popcount32 (uint32_t mask)
return __builtin_popcount (mask);
#else
/* "HACKMEM 169" */
register uint32_t y;
uint32_t y;
y = (mask >> 1) &033333333333;
y = mask - y - ((y >>1) & 033333333333);
return (((y + (y >> 3)) & 030707070707) % 077);
Expand All @@ -233,7 +233,7 @@ _hb_bit_storage (unsigned int number)
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0;
#else
register unsigned int n_bits = 0;
unsigned int n_bits = 0;
while (number) {
n_bits++;
number >>= 1;
Expand All @@ -249,7 +249,7 @@ _hb_ctz (unsigned int number)
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
return likely (number) ? __builtin_ctz (number) : 0;
#else
register unsigned int n_bits = 0;
unsigned int n_bits = 0;
if (unlikely (!number)) return 0;
while (!(number & 1)) {
n_bits++;
Expand Down

0 comments on commit 591364d

Please sign in to comment.