From 6a95a9ffdb59ab36d39d918010956e2e2785892a Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Tue, 13 Feb 2018 17:46:23 +1300 Subject: [PATCH] Fix signed vs unsigned warnings with assertions on --- xapian-core/backends/honey/honey_table.cc | 2 +- xapian-core/queryparser/queryparser.lt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xapian-core/backends/honey/honey_table.cc b/xapian-core/backends/honey/honey_table.cc index d5181a3fc..539715781 100644 --- a/xapian-core/backends/honey/honey_table.cc +++ b/xapian-core/backends/honey/honey_table.cc @@ -200,7 +200,7 @@ HoneyTable::read_item(std::string& key, val.assign(p, end); if (p != end) std::abort(); val_size -= (end - p); - AssertRel(fh.get_pos() + val_size, <=, root); + AssertRel(fh.get_pos() + val_size, <=, size_t(root)); val.resize(val_size); fh.read(&(val[0]), val_size); if (false) { diff --git a/xapian-core/queryparser/queryparser.lt b/xapian-core/queryparser/queryparser.lt index bb39d7feb..7c98de2ef 100644 --- a/xapian-core/queryparser/queryparser.lt +++ b/xapian-core/queryparser/queryparser.lt @@ -467,7 +467,7 @@ static unsigned int yy_find_shift_action( #endif do{ i = yy_shift_ofst[stateno]; - Assert( i>=0 && i+YYNTOKEN<=sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) ); + Assert( i>=0 && i+YYNTOKEN<=(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) ); Assert( iLookAhead!=YYNOCODE ); Assert( iLookAhead < YYNTOKEN ); i += iLookAhead; -- 2.11.4.GIT