summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-18 15:20:38 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-18 15:20:38 +0200
commit84ffe04075bbddfd1b288295c07d036416923c3a (patch)
tree1d3b80144cad20aeab554084d42e7ba592fc686e /kernel
parent85572b05e5359f28c1625b873dc14428f796a454 (diff)
Fixed various VS warnings
Diffstat (limited to 'kernel')
-rw-r--r--kernel/log.cc2
-rw-r--r--kernel/rtlil.cc4
-rw-r--r--kernel/yosys.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index 19eb38c7..807f58bf 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -64,7 +64,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
counter.QuadPart *= 1000000;
counter.QuadPart /= freq.QuadPart;
- tv->tv_sec = counter.QuadPart / 1000000;
+ tv->tv_sec = long(counter.QuadPart / 1000000);
tv->tv_usec = counter.QuadPart % 1000000;
return 0;
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 36443c5a..1a9eb4d1 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -1778,7 +1778,7 @@ const std::map<RTLIL::IdString, RTLIL::SigSpec> &RTLIL::Cell::connections() cons
bool RTLIL::Cell::hasParam(RTLIL::IdString paramname) const
{
- return parameters.count(paramname);
+ return parameters.count(paramname) != 0;
}
void RTLIL::Cell::unsetParam(RTLIL::IdString paramname)
@@ -3041,7 +3041,7 @@ bool RTLIL::SigSpec::parse_rhs(const RTLIL::SigSpec &lhs, RTLIL::SigSpec &sig, R
if (lhs.chunks_.size() == 1) {
char *p = (char*)str.c_str(), *endptr;
- long long int val = strtoll(p, &endptr, 10);
+ long int val = strtol(p, &endptr, 10);
if (endptr && endptr != p && *endptr == 0) {
sig = RTLIL::SigSpec(val, lhs.width_);
cover("kernel.rtlil.sigspec.parse.rhs_dec");
diff --git a/kernel/yosys.cc b/kernel/yosys.cc
index 7d1d273c..f314f546 100644
--- a/kernel/yosys.cc
+++ b/kernel/yosys.cc
@@ -231,7 +231,7 @@ std::string make_temp_file(std::string template_str)
while (1) {
for (int i = 0; i < 6; i++) {
static std::string y = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
- static uint32_t x = 314159265 ^ time(NULL);
+ static uint32_t x = 314159265 ^ uint32_t(time(NULL));
x ^= x << 13, x ^= x >> 17, x ^= x << 5;
template_str[pos+i] = y[x % y.size()];
}