GNOME Bugzilla – Bug 778656
pango-layout: Add a clarifying assertion
Last modified: 2017-02-16 10:47:30 UTC
Make the static analyser’s job a little easier.
Created attachment 345791 [details] [review] pango-layout: Add a clarifying assertion In pango_layout_index_to_pos(), it looks like layout_line could be dereferenced while still NULL in the first loop iteration. This is not the case, as other bits of PangoLayout ensure its start_index is always 0, so this branch is never taken. Add an assertion to clarify that and guide static analysis. Coverity ID: 1391700 Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 345791 [details] [review]: looks ok to me
Attachment 345791 [details] pushed as bfe9cdc - pango-layout: Add a clarifying assertion