Fix a few warnings

This commit is contained in:
Behdad Esfahbod 2018-12-23 20:19:52 -05:00
parent 85003b594b
commit d25a2f1496
7 changed files with 17 additions and 15 deletions

View File

@ -707,22 +707,22 @@ struct ExtendedTypes
template <typename T> template <typename T>
static unsigned int offsetToIndex (unsigned int offset, static unsigned int offsetToIndex (unsigned int offset,
const void *base, const void *base HB_UNUSED,
const T *array) const T *array HB_UNUSED)
{ {
return offset; return offset;
} }
template <typename T> template <typename T>
static unsigned int byteOffsetToIndex (unsigned int offset, static unsigned int byteOffsetToIndex (unsigned int offset,
const void *base, const void *base HB_UNUSED,
const T *array) const T *array HB_UNUSED)
{ {
return offset / 2; return offset / 2;
} }
template <typename T> template <typename T>
static unsigned int wordOffsetToIndex (unsigned int offset, static unsigned int wordOffsetToIndex (unsigned int offset,
const void *base, const void *base HB_UNUSED,
const T *array) const T *array HB_UNUSED)
{ {
return offset; return offset;
} }

View File

@ -85,8 +85,8 @@ struct hb_iter_t
protected: protected:
hb_iter_t () {} hb_iter_t () {}
hb_iter_t (const hb_iter_t &o) {} hb_iter_t (const hb_iter_t &o HB_UNUSED) {}
void operator = (const hb_iter_t &o) {} void operator = (const hb_iter_t &o HB_UNUSED) {}
}; };
/* Base class for sorted iterators. Does not enforce anything. /* Base class for sorted iterators. Does not enforce anything.
@ -96,8 +96,8 @@ struct hb_sorted_iter_t : hb_iter_t<Iter, Item>
{ {
protected: protected:
hb_sorted_iter_t () {} hb_sorted_iter_t () {}
hb_sorted_iter_t (const hb_sorted_iter_t &o) : hb_iter_t<Iter, Item> () {} hb_sorted_iter_t (const hb_sorted_iter_t &o) : hb_iter_t<Iter, Item> (o) {}
void operator = (const hb_sorted_iter_t &o) {} void operator = (const hb_sorted_iter_t &o HB_UNUSED) {}
}; };
/* Mixin to fill in what the subclass doesn't provide. */ /* Mixin to fill in what the subclass doesn't provide. */

View File

@ -93,7 +93,7 @@ struct _hb_assign<T, T, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
template <typename T, typename V> template <typename T, typename V>
static inline void hb_assign (T &o, const V v) static inline void hb_assign (T &o, const V v)
{ _hb_assign<T, V, _hb_bool_type<true> >::value (o, v); }; { _hb_assign<T, V, _hb_bool_type<true> >::value (o, v); }
/* /*

View File

@ -976,7 +976,7 @@ typedef dict_interpreter_t<cff1_font_dict_opset_t, cff1_font_dict_values_t> cff1
typedef CFF1Index CFF1NameIndex; typedef CFF1Index CFF1NameIndex;
typedef CFF1IndexOf<TopDict> CFF1TopDictIndex; typedef CFF1IndexOf<TopDict> CFF1TopDictIndex;
}; /* namespace CFF */ } /* namespace CFF */
namespace OT { namespace OT {

View File

@ -400,7 +400,7 @@ struct cff2_private_dict_opset_subset_t : dict_opset_t
typedef dict_interpreter_t<cff2_top_dict_opset_t, cff2_top_dict_values_t> cff2_top_dict_interpreter_t; typedef dict_interpreter_t<cff2_top_dict_opset_t, cff2_top_dict_values_t> cff2_top_dict_interpreter_t;
typedef dict_interpreter_t<cff2_font_dict_opset_t, cff2_font_dict_values_t> cff2_font_dict_interpreter_t; typedef dict_interpreter_t<cff2_font_dict_opset_t, cff2_font_dict_values_t> cff2_font_dict_interpreter_t;
}; /* namespace CFF */ } /* namespace CFF */
namespace OT { namespace OT {

View File

@ -965,7 +965,8 @@ struct subr_subsetter_t
private: private:
typedef typename SUBRS::count_type subr_count_type; typedef typename SUBRS::count_type subr_count_type;
}; };
}; /* namespace CFF */
} /* namespace CFF */
HB_INTERNAL bool HB_INTERNAL bool
hb_plan_subset_cff_fdselect (const hb_vector_t<hb_codepoint_t> &glyphs, hb_plan_subset_cff_fdselect (const hb_vector_t<hb_codepoint_t> &glyphs,

View File

@ -468,7 +468,8 @@ typedef uint64_t hb_vector_size_impl_t;
static inline T& operator |= (T &l, T r) { l = l | r; return l; } \ static inline T& operator |= (T &l, T r) { l = l | r; return l; } \
static inline T& operator &= (T& l, T r) { l = l & r; return l; } \ static inline T& operator &= (T& l, T r) { l = l & r; return l; } \
static inline T& operator ^= (T& l, T r) { l = l ^ r; return l; } \ static inline T& operator ^= (T& l, T r) { l = l ^ r; return l; } \
} } \
static_assert (true, "")
/* Useful for set-operations on small enums. /* Useful for set-operations on small enums.
* For example, for testing "x ∈ {x1, x2, x3}" use: * For example, for testing "x ∈ {x1, x2, x3}" use: