diff options
author | Qunxin Liu <qxliu@google.com> | 2023-09-20 14:52:58 -0700 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2023-09-20 17:05:47 -0600 |
commit | 5aa4865a86fd97e76e857823dd4b32c65d2fa0ad (patch) | |
tree | 0093298a60299eff6b44f31db4b94704600a722c | |
parent | 4b3aa0104ea4c7859095b0e78662e440483068da (diff) | |
download | harfbuzz_ng-5aa4865a86fd97e76e857823dd4b32c65d2fa0ad.tar.gz |
[instancer] fix compile warnings
In constructor ‘OT::delta_row_encoding_t::delta_row_encoding_t(OT::delta_row_encoding_t&&)’,
inlined from ‘Type* hb_vector_t<Type, sorted>::push(Args&& ...) [with Args = {OT::delta_row_encoding_t}; Type = OT::delta_row_encoding_t; bool sorted = false]’ at ../src/hb-vector.hh:221:12,
inlined from ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’ at ../src/hb-ot-var-common.hh:1985:24:
../src/hb-ot-layout-common.hh:2304:8: warning: ‘obj.OT::delta_row_encoding_t::width’ may be used uninitialized [-Wmaybe-uninitialized]
2304 | struct delta_row_encoding_t
| ^~~~~~~~~~~~~~~~~~~~
../src/hb-ot-var-common.hh: In member function ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’:
../src/hb-ot-var-common.hh:1981:30: note: ‘obj.OT::delta_row_encoding_t::width’ was declared here
1981 | delta_row_encoding_t obj;
| ^~~
In constructor ‘OT::delta_row_encoding_t::delta_row_encoding_t(OT::delta_row_encoding_t&&)’,
inlined from ‘Type* hb_vector_t<Type, sorted>::push(Args&& ...) [with Args = {OT::delta_row_encoding_t}; Type = OT::delta_row_encoding_t; bool sorted = false]’ at ../src/hb-vector.hh:221:12,
inlined from ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’ at ../src/hb-ot-var-common.hh:1985:24:
../src/hb-ot-layout-common.hh:2304:8: warning: ‘obj.OT::delta_row_encoding_t::overhead’ may be used uninitialized [-Wmaybe-uninitialized]
2304 | struct delta_row_encoding_t
| ^~~~~~~~~~~~~~~~~~~~
../src/hb-ot-var-common.hh: In member function ‘bool OT::item_variations_t::as_item_varstore(bool, bool)’:
../src/hb-ot-var-common.hh:1981:30: note: ‘obj.OT::delta_row_encoding_t::overhead’ was declared here
1981 | delta_row_encoding_t obj;
-rw-r--r-- | src/hb-ot-layout-common.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 8d003a2b3..4c235ff44 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2306,9 +2306,9 @@ struct delta_row_encoding_t /* each byte represents a region, value is one of 0/1/2/4, which means bytes * needed for this region */ hb_vector_t<uint8_t> chars; - unsigned width; + unsigned width = 0; hb_vector_t<uint8_t> columns; - unsigned overhead; + unsigned overhead = 0; hb_vector_t<const hb_vector_t<int>*> items; delta_row_encoding_t () = default; |