[devhelp/wip/swilmet/fix-warnings] KeywordModel: fix another comparison between signed and unsigned int
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/wip/swilmet/fix-warnings] KeywordModel: fix another comparison between signed and unsigned int
- Date: Sun, 27 Nov 2016 11:55:22 +0000 (UTC)
commit 395abeabc727defc16c747f78f7e3aaa776a50fc
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Nov 27 12:53:31 2016 +0100
KeywordModel: fix another comparison between signed and unsigned int
max_hits is compared to GQueue.length, which is a guint.
max_hits is not modified, so it cannot become negative, so it is safe to
change it to a guint.
src/dh-keyword-model.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/dh-keyword-model.c b/src/dh-keyword-model.c
index 7632dba..a5f4a0c 100644
--- a/src/dh-keyword-model.c
+++ b/src/dh-keyword-model.c
@@ -673,7 +673,7 @@ keyword_model_search (DhKeywordModel *model,
DhLink **exact_link)
{
SearchSettings settings;
- gint max_hits = MAX_HITS;
+ guint max_hits = MAX_HITS;
GQueue *in_book = NULL;
GQueue *other_books = NULL;
DhLink *in_book_exact_link = NULL;
@@ -699,7 +699,7 @@ keyword_model_search (DhKeywordModel *model,
* more than MAX_HITS keywords, and the page link may be
* the last one in the list, but we always want to get it.
*/
- max_hits = G_MAXINT;
+ max_hits = G_MAXUINT;
}
/* If book_id given; first look for prefixed items in the given book id */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]