Harmless cast (doc count shouldn't be negative).
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/b5ad0f22 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/b5ad0f22 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/b5ad0f22 Branch: refs/heads/master Commit: b5ad0f223343cee8e554438ce49693efa3bc1646 Parents: 25747a2 Author: Marvin Humphrey <[email protected]> Authored: Thu May 26 20:08:53 2016 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Thu May 26 20:11:30 2016 -0700 ---------------------------------------------------------------------- core/Lucy/Search/IndexSearcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/b5ad0f22/core/Lucy/Search/IndexSearcher.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Search/IndexSearcher.c b/core/Lucy/Search/IndexSearcher.c index 000d66c..ccdb163 100644 --- a/core/Lucy/Search/IndexSearcher.c +++ b/core/Lucy/Search/IndexSearcher.c @@ -115,12 +115,12 @@ TopDocs* IxSearcher_Top_Docs_IMP(IndexSearcher *self, Query *query, uint32_t num_wanted, SortSpec *sort_spec) { Schema *schema = IxSearcher_Get_Schema(self); - uint32_t doc_max = IxSearcher_Doc_Max(self); + uint32_t doc_max = (uint32_t)IxSearcher_Doc_Max(self); uint32_t wanted = num_wanted > doc_max ? doc_max : num_wanted; SortCollector *collector = SortColl_new(schema, sort_spec, wanted); IxSearcher_Collect(self, query, (Collector*)collector); Vector *match_docs = SortColl_Pop_Match_Docs(collector); - int32_t total_hits = SortColl_Get_Total_Hits(collector); + uint32_t total_hits = SortColl_Get_Total_Hits(collector); TopDocs *retval = TopDocs_new(match_docs, total_hits); DECREF(collector); DECREF(match_docs);
