summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh13
1 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
index 429bab0035a..32e335495cf 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-private.hh
@@ -147,7 +147,7 @@ extern "C" void hb_free_impl(void *ptr);
#define HB_FUNC __func__
#endif
-#ifdef __SUNPRO_CC
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
/* https://github.com/harfbuzz/harfbuzz/issues/630 */
#define __restrict
#endif
@@ -369,6 +369,7 @@ _hb_popcount (T v)
}
assert (0);
+ return 0; /* Shut up stupid compiler. */
}
/* Returns the number of bits needed to store number */
@@ -437,11 +438,12 @@ _hb_bit_storage (T v)
if (sizeof (T) == 16)
{
unsigned int shift = 64;
- return (v >> shift) ? _hb_bit_storage<uint64_t> ((uint64_t) v >> shift) + shift :
+ return (v >> shift) ? _hb_bit_storage<uint64_t> ((uint64_t) (v >> shift)) + shift :
_hb_bit_storage<uint64_t> ((uint64_t) v);
}
assert (0);
+ return 0; /* Shut up stupid compiler. */
}
/* Returns the number of zero bits in the least significant side of v */
@@ -514,6 +516,7 @@ _hb_ctz (T v)
}
assert (0);
+ return 0; /* Shut up stupid compiler. */
}
static inline bool
@@ -713,6 +716,9 @@ struct hb_vector_t
if (!alloc (size))
return false;
+ if (size > len)
+ memset (arrayZ + len, 0, (size - len) * sizeof (*arrayZ));
+
len = size;
return true;
}
@@ -1232,7 +1238,4 @@ round (double x)
#endif
-HB_INTERNAL unsigned int _hb_prime_for (unsigned int shift);
-
-
#endif /* HB_PRIVATE_HH */