// used to remember the last one we saw
// we'll be comparing entries to see if we need to add
// modifiers, like "1984a"
- map<docstring, BibTeXInfo>::iterator last;
+ map<docstring, BibTeXInfo>::iterator last = bimap_.end();
vector<docstring>::const_iterator it = cited_entries_.begin();
vector<docstring>::const_iterator const en = cited_entries_.end();
docstring const num = convert<docstring>(++keynumber);
entry.setCiteNumber(num);
} else {
- // coverity complains about our derefercing the iterator last,
- // which was not initialized above. but it does get initialized
- // after the first time through the loop, which is the point of
- // the first test.
- // coverity[FORWARD_NULL]
- if (it != cited_entries_.begin()
+ if (last != bimap_.end()
&& entry.getAuthorOrEditorList() == last->second.getAuthorOrEditorList()
// we access the year via getYear() so as to get it from the xref,
// if we need to do so