From db87b6a7c2391007944fba146dfb02f66c5796f5 Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Sun, 30 Sep 2007 16:27:08 +0000 Subject: [PATCH] fix build on amd64: guint32 and size_t may be different type, so usage of std::min is incorrect --- src/lib/lib.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/lib.cpp b/src/lib/lib.cpp index 2fcd833..7a4b1d7 100644 --- a/src/lib/lib.cpp +++ b/src/lib/lib.cpp @@ -513,7 +513,10 @@ inline const gchar *offset_index::read_first_on_page_key(glong page_idx) { fseek(idxfile, wordoffset[page_idx], SEEK_SET); guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx]; - fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. + fread(wordentry_buf, + std::min(sizeof(wordentry_buf), static_cast(page_size)), + 1, idxfile); + //TODO: check returned values, deal with word entry that strlen>255. return wordentry_buf; }