diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-04-16T12·03+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-04-16T12·03+0000 |
commit | 4e646b0ddb81e1fbf1159ad66a41de848fe93930 (patch) | |
tree | 1c7295c046c121069d2161f8dadba3672a5d54d6 /src/libutil | |
parent | 0460ea4c395cc45e510d13fbf12930dd3d221305 (diff) |
* Fix a few "comparison is always false/true due to limited range of
data type" warnings on 64-bit platforms. The one in parser.y is likely to be a real bug.
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/archive.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index 3142aa929b3e..8f100da4c3ed 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -50,7 +50,7 @@ static void dumpEntries(const Path & path, Sink & sink, PathFilter & filter) } -static void dumpContents(const Path & path, off_t size, +static void dumpContents(const Path & path, size_t size, Sink & sink) { writeString("contents", sink); @@ -60,7 +60,7 @@ static void dumpContents(const Path & path, off_t size, if (fd == -1) throw SysError(format("opening file `%1%'") % path); unsigned char buf[65536]; - off_t left = size; + size_t left = size; while (left > 0) { size_t n = left > sizeof(buf) ? sizeof(buf) : left; @@ -88,7 +88,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter) writeString("executable", sink); writeString("", sink); } - dumpContents(path, st.st_size, sink); + dumpContents(path, (size_t) st.st_size, sink); } else if (S_ISDIR(st.st_mode)) { |