[Xapian-tickets] [Xapian] #816: expand/ortermlist.cc:166:12: warning: duplicated 'if' condition

Xapian nobody at xapian.org
Wed Oct 20 21:05:42 BST 2021


#816: expand/ortermlist.cc:166:12: warning: duplicated 'if' condition
--------------------+-------------------------------
 Reporter:  dcb     |             Owner:  Olly Betts
     Type:  defect  |            Status:  assigned
 Priority:  normal  |         Milestone:  1.4.19
Component:  Other   |           Version:  1.4.17
 Severity:  normal  |        Resolution:
 Keywords:          |        Blocked By:
 Blocking:          |  Operating System:  All
--------------------+-------------------------------
Changes (by Olly Betts):

 * status:  new => assigned
 * version:   => 1.4.17
 * milestone:   => 1.4.19

Comment:

 You don't mention the version, but checking this is present in both git
 master and 1.4 branch.

 It was introduced in master by 6c522cf1e2afc520b02e47a6e0ce3615f544a885,
 and backported in de75e6508538c6f8553e8313e2185fcc68143c0a which is in
 1.4.17 and 1.4.18.

 The equivalent code in the `next()` case is correct, so only `skip_to()`
 is affected.

 This class is used in a few places, but the `skip_to()` method can never
 get called in some uses (such as generating spelling suggestions).

 I think this could be triggered with a sharded database by getting a
 `TermIterator` from `Database::spellings_begin()` or
 `Database::synonyms_begin()` or `Database::synonym_keys_begin()` and
 calling `skip_to()` on it.
-- 
Ticket URL: <https://trac.xapian.org/ticket/816#comment:1>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list