From: Behdad Esfahbod Date: Wed, 8 May 2019 19:01:55 +0000 (-0700) Subject: Make compiler happy with -Og X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=750d5af48e38627c3c84a2f3857a7ee602221e24;p=platform%2Fupstream%2FlibHarfBuzzSharp.git Make compiler happy with -Og --- diff --git a/src/hb-cff-interp-cs-common.hh b/src/hb-cff-interp-cs-common.hh index 71bc292..2f892f8 100644 --- a/src/hb-cff-interp-cs-common.hh +++ b/src/hb-cff-interp-cs-common.hh @@ -160,7 +160,7 @@ struct cs_interp_env_t : interp_env_t void callSubr (const biased_subrs_t& biasedSubrs, cs_type_t type) { - unsigned int subr_num; + unsigned int subr_num = 0; if (unlikely (!popSubrNum (biasedSubrs, subr_num) || callStack.get_count () >= kMaxCallLimit)) diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index b4c8c60..cec78d7 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -142,7 +142,7 @@ struct CmapSubtableFormat4 for (unsigned int j = 0; j < num_codepoints; j++) { hb_codepoint_t cp = segments[i].start_code + j; - hb_codepoint_t new_gid; + hb_codepoint_t new_gid = 0; if (unlikely (!plan->new_gid_for_codepoint (cp, &new_gid))) return_trace (false); glyph_id_array[j] = new_gid; @@ -183,7 +183,7 @@ struct CmapSubtableFormat4 hb_codepoint_t cp = HB_SET_VALUE_INVALID; while (plan->unicodes->next (&cp)) { - hb_codepoint_t new_gid; + hb_codepoint_t new_gid = 0; if (unlikely (!plan->new_gid_for_codepoint (cp, &new_gid))) { DEBUG_MSG(SUBSET, nullptr, "Unable to find new gid for %04x", cp); @@ -542,7 +542,7 @@ struct CmapSubtableFormat12 : CmapSubtableLongSegmented hb_codepoint_t cp = HB_SET_VALUE_INVALID; while (plan->unicodes->next (&cp)) { - hb_codepoint_t new_gid; + hb_codepoint_t new_gid = 0; if (unlikely (!plan->new_gid_for_codepoint (cp, &new_gid))) { DEBUG_MSG(SUBSET, nullptr, "Unable to find new gid for %04x", cp); diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 2a96c2e..f7629ec 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -283,7 +283,7 @@ struct glyf /* based on FontTools _g_l_y_f.py::trim */ bool remove_padding (unsigned int start_offset, - unsigned int *end_offset) const + unsigned int *end_offset) const { if (*end_offset - start_offset < GlyphHeader::static_size) return true; diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc index d402331..0647ee4 100644 --- a/src/hb-subset-glyf.cc +++ b/src/hb-subset-glyf.cc @@ -108,7 +108,7 @@ _calculate_glyf_and_loca_prime_size (const OT::glyf::accelerator_t &glyf, hb_codepoint_t next_glyph = HB_SET_VALUE_INVALID; while (plan->glyphset ()->next (&next_glyph)) { - unsigned int start_offset, end_offset; + unsigned int start_offset = 0, end_offset = 0; if (unlikely (!(glyf.get_offsets (next_glyph, &start_offset, &end_offset) && glyf.remove_padding (start_offset, &end_offset)))) { @@ -211,7 +211,7 @@ _write_glyf_and_loca_prime (const hb_subset_plan_t *plan, } - unsigned int start_offset, end_offset; + unsigned int start_offset = 0, end_offset = 0; if (unlikely (!(glyf.get_offsets (old_gid, &start_offset, &end_offset) && glyf.remove_padding (start_offset, &end_offset)))) end_offset = start_offset = 0;