aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/algorithm.cxx2
-rw-r--r--build2/config/operation.cxx2
-rw-r--r--build2/file.cxx2
-rw-r--r--build2/test/script/regex.cxx2
-rw-r--r--build2/utility.cxx6
-rw-r--r--unit-tests/scheduler/driver.cxx2
6 files changed, 10 insertions, 6 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx
index 8203b08..156a209 100644
--- a/build2/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -292,7 +292,7 @@ namespace build2
// First try the map for the actual operation. If that doesn't yeld
// anything, try the wildcard map.
//
- for (size_t oi (o), oip (o); oip != 0; oip = oi, oi = 0)
+ for (operation_id oi (o), oip (o); oip != 0; oip = oi, oi = 0)
{
const target_type_rule_map* ttm ((*om)[oi]);
diff --git a/build2/config/operation.cxx b/build2/config/operation.cxx
index bffc45b..c7cfefd 100644
--- a/build2/config/operation.cxx
+++ b/build2/config/operation.cxx
@@ -377,7 +377,7 @@ namespace build2
if (rs == nullptr)
fail << "out of project target " << t;
- for (operations::size_type id (default_id + 1); // Skip default_id
+ for (operation_id id (default_id + 1); // Skip default_id
id < rs->operations.size ();
++id)
{
diff --git a/build2/file.cxx b/build2/file.cxx
index ddcce82..8b86d74 100644
--- a/build2/file.cxx
+++ b/build2/file.cxx
@@ -434,7 +434,7 @@ namespace build2
if (de.type () != entry_type::directory)
continue;
}
- catch (const system_error& e)
+ catch (const system_error&)
{
continue;
}
diff --git a/build2/test/script/regex.cxx b/build2/test/script/regex.cxx
index bf38a62..38ac096 100644
--- a/build2/test/script/regex.cxx
+++ b/build2/test/script/regex.cxx
@@ -405,6 +405,6 @@ namespace std
const char digits[] = "0123456789ABCDEF";
const char* d (string::traits_type::find (digits, radix, c.special ()));
- return d != nullptr ? d - digits : -1;
+ return d != nullptr ? static_cast<int> (d - digits) : -1;
}
}
diff --git a/build2/utility.cxx b/build2/utility.cxx
index 5cd01be..09a2342 100644
--- a/build2/utility.cxx
+++ b/build2/utility.cxx
@@ -4,7 +4,7 @@
#include <build2/utility.hxx>
-#include <time.h> // tzset()
+#include <time.h> // tzset() (POSIX), _tzset() (Windows)
#include <cstring> // strlen(), str[n]cmp()
#include <cstdlib> // strtol()
@@ -461,7 +461,11 @@ namespace build2
// Initialize time conversion data that is used by localtime_r().
//
+#ifndef _WIN32
tzset ();
+#else
+ _tzset ();
+#endif
// Figure out work and home directories.
//
diff --git a/unit-tests/scheduler/driver.cxx b/unit-tests/scheduler/driver.cxx
index 31551f2..783ddc9 100644
--- a/unit-tests/scheduler/driver.cxx
+++ b/unit-tests/scheduler/driver.cxx
@@ -130,7 +130,7 @@ namespace build2
s.wait (task_count);
assert (task_count == 0);
- size_t n (0);
+ uint64_t n (0);
for (uint64_t v: r)
n += v;