about summary refs log tree commit diff
path: root/src/libstore/nar-accessor.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-12-08T19·37+0100
committerEelco Dolstra <edolstra@gmail.com>2016-12-08T19·37+0100
commit88ef77226e0a395a0151297c295843d2e39f24d5 (patch)
treefa6ad49c49f3c4790484c40569c6dd27de1dbd00 /src/libstore/nar-accessor.cc
parente629a17cc1781360918640642444643131b02f8c (diff)
Fix warning on 32-bit systems
http://hydra.nixos.org/build/44628517
Diffstat (limited to 'src/libstore/nar-accessor.cc')
-rw-r--r--src/libstore/nar-accessor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/nar-accessor.cc b/src/libstore/nar-accessor.cc
index ded19c05d2cd..4cb5de7449ea 100644
--- a/src/libstore/nar-accessor.cc
+++ b/src/libstore/nar-accessor.cc
@@ -52,8 +52,9 @@ struct NarIndexer : ParseSink, StringSource
     void preallocateContents(unsigned long long size) override
     {
         currentStart = string(s, pos, 16);
+        assert(size <= std::numeric_limits<size_t>::max());
         members.emplace(currentPath,
-            NarMember{FSAccessor::Type::tRegular, isExec, pos, size});
+            NarMember{FSAccessor::Type::tRegular, isExec, pos, (size_t) size});
     }
 
     void receiveContents(unsigned char * data, unsigned int len) override