[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/118: Shut up some signedness warnings
From: |
Ludovic Courtès |
Subject: |
05/118: Shut up some signedness warnings |
Date: |
Tue, 19 May 2015 14:45:08 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit f0fdbd0897ce63c138ec663ed89a94709a8441a7
Author: Eelco Dolstra <address@hidden>
Date: Mon May 26 12:34:15 2014 +0200
Shut up some signedness warnings
---
src/libexpr/primops.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index c69d520..f402478 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);
}
- branch nix updated (a1dd396 -> 3bfa70b), Ludovic Courtès, 2015/05/19
- 01/118: Provide a more useful error message when a dynamic attr lookup fails, Ludovic Courtès, 2015/05/19
- 08/118: Ensure that -I flags get included in nixPath, Ludovic Courtès, 2015/05/19
- 05/118: Shut up some signedness warnings,
Ludovic Courtès <=
- 02/118: nix-store -l: Fetch build logs from the Internet, Ludovic Courtès, 2015/05/19
- 03/118: Disable parallel.sh test, Ludovic Courtès, 2015/05/19
- 07/118: Add constant ‘nixPath’, Ludovic Courtès, 2015/05/19
- 14/118: Use std::unordered_set, Ludovic Courtès, 2015/05/19
- 13/118: nix-build: --add-root also takes 1 parameter, Ludovic Courtès, 2015/05/19
- 16/118: Fix test, Ludovic Courtès, 2015/05/19
- 15/118: Sort nixPath attributes, Ludovic Courtès, 2015/05/19
- 10/118: Remove ExprBuiltin, Ludovic Courtès, 2015/05/19
- 09/118: Make the Nix search path declarative, Ludovic Courtès, 2015/05/19
- 04/118: Ugly hack to allow --argstr values starting with a dash, Ludovic Courtès, 2015/05/19