about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-26T10·34+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-26T10·34+0200
commitf0fdbd0897ce63c138ec663ed89a94709a8441a7 (patch)
tree178dcf168c0fe8824fd1779cb976878ba0ed2aa8 /src
parent0321ef9bb261958fe4d63210e9a9d3350737ef18 (diff)
Shut up some signedness warnings
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index c69d520d3be0..f402478dd974 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -944,7 +944,7 @@ static void prim_isList(EvalState & state, const Pos & pos, Value * * args, Valu
 static void elemAt(EvalState & state, const Pos & pos, Value & list, int n, Value & v)
 {
     state.forceList(list, pos);
-    if (n < 0 || n >= list.list.length)
+    if (n < 0 || (unsigned int) n >= list.list.length)
         throw Error(format("list index %1% is out of bounds, at %2%") % n % pos);
     state.forceValue(*list.list.elems[n]);
     v = *list.list.elems[n];
@@ -1123,7 +1123,7 @@ static void prim_substring(EvalState & state, const Pos & pos, Value * * args, V
 
     if (start < 0) throw EvalError(format("negative start position in `substring', at %1%") % pos);
 
-    mkString(v, start >= s.size() ? "" : string(s, start, len), context);
+    mkString(v, (unsigned int) start >= s.size() ? "" : string(s, start, len), context);
 }