about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libexpr/attr-path.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc
index 2b72fea7eb8e..109001e6015d 100644
--- a/src/libexpr/attr-path.cc
+++ b/src/libexpr/attr-path.cc
@@ -27,7 +27,7 @@ void findAlongAttrPath(EvalState & state, const string & attrPath,
         /* Is *i an index (integer) or a normal attribute name? */
         enum { apAttr, apIndex } apType = apAttr;
         string attr = *i;
-        int attrIndex = -1;
+        unsigned int attrIndex;
         if (string2Int(attr, attrIndex)) apType = apIndex;
 
         /* Evaluate the expression. */