about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/gc.cc2
-rw-r--r--src/libstore/globals.cc2
-rw-r--r--src/libstore/references.cc2
-rw-r--r--src/libstore/store.cc4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index c2bc5bdb1b92..dc0b078e52c9 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -212,7 +212,7 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds)
         string contents = readFile(*fd);
 
         /* Extract the roots. */
-        unsigned int pos = 0, end;
+        string::size_type pos = 0, end;
 
         while ((end = contents.find((char) 0, pos)) != string::npos) {
             Path root(contents, pos, end - pos);
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index fc338892f22d..194e1165face 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -46,7 +46,7 @@ static void readSettings()
             line += contents[pos++];
         pos++;
 
-        unsigned int hash = line.find('#');
+        string::size_type hash = line.find('#');
         if (hash != string::npos)
             line = string(line, 0, hash);
 
diff --git a/src/libstore/references.cc b/src/libstore/references.cc
index 4e4bb7ad1e62..d67e5b9dcc82 100644
--- a/src/libstore/references.cc
+++ b/src/libstore/references.cc
@@ -99,7 +99,7 @@ PathSet scanForReferences(const string & path, const PathSet & paths)
        have the form `HASH-bla'). */
     for (PathSet::const_iterator i = paths.begin(); i != paths.end(); i++) {
         string baseName = baseNameOf(*i);
-        unsigned int pos = baseName.find('-');
+        string::size_type pos = baseName.find('-');
         if (pos == string::npos)
             throw Error(format("bad reference `%1%'") % *i);
         string s = string(baseName, 0, pos);
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 556ba8e62166..4bf62570e623 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -243,7 +243,7 @@ Path toStorePath(const Path & path)
 {
     if (!isInStore(path))
         throw Error(format("path `%1%' is not in the Nix store") % path);
-    unsigned int slash = path.find('/', nixStore.size() + 1);
+    Path::size_type slash = path.find('/', nixStore.size() + 1);
     if (slash == Path::npos)
         return path;
     else
@@ -563,7 +563,7 @@ static Hash queryHash(const Transaction & txn, const Path & storePath)
 {
     string s;
     nixDB.queryString(txn, dbValidPaths, storePath, s);
-    unsigned int colon = s.find(':');
+    string::size_type colon = s.find(':');
     if (colon == string::npos)
         throw Error(format("corrupt hash `%1%' in valid-path entry for `%2%'")
             % s % storePath);