OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
1 | --- sdcv-0.4.2/src/lib/lib.cpp 2006-04-24 10:17:27.000000000 +0200 |
2 | +++ sdcv-0.4.2m/src/lib/lib.cpp 2010-05-28 19:03:20.000000000 +0200 |
3 | @@ -5,10 +5,12 @@ |
4 | #include <algorithm> |
5 | #include <cstring> |
6 | #include <cctype> |
7 | +#include <cstdlib> |
8 | |
9 | #include <sys/stat.h> |
10 | #include <zlib.h> |
11 | #include <glib/gstdio.h> |
12 | +#include <stdlib.h> |
13 | |
14 | #include "distance.h" |
15 | #include "file.hpp" |
16 | @@ -513,7 +515,7 @@ |
17 | { |
18 | fseek(idxfile, wordoffset[page_idx], SEEK_SET); |
19 | guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx]; |
20 | - fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. |
21 | + fread(wordentry_buf, std::min((long)sizeof(wordentry_buf), (long)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. |
22 | return wordentry_buf; |
23 | } |
24 | |
25 |