From bcc873b805f8ec74422752da530b71d8d762bded Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 13 Feb 2016 17:31:24 +0100 Subject: Fixed some visual studio warnings --- kernel/hashlib.h | 2 +- kernel/modtools.h | 4 ++-- kernel/yosys.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel') diff --git a/kernel/hashlib.h b/kernel/hashlib.h index a31c62e56..972a8b8d8 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -74,7 +74,7 @@ template<> struct hash_ops : hash_int_ops template<> struct hash_ops : hash_int_ops { static inline unsigned int hash(int64_t a) { - return mkhash(a, a >> 32); + return mkhash((unsigned int)(a), (unsigned int)(a >> 32)); } }; diff --git a/kernel/modtools.h b/kernel/modtools.h index 1480ec71f..ffcb48d44 100644 --- a/kernel/modtools.h +++ b/kernel/modtools.h @@ -180,8 +180,8 @@ struct ModIndex : public RTLIL::Monitor { RTLIL::SigBit lhs = sigmap(sigsig.first[i]); RTLIL::SigBit rhs = sigmap(sigsig.second[i]); - bool has_lhs = database.count(lhs); - bool has_rhs = database.count(rhs); + bool has_lhs = database.count(lhs) != 0; + bool has_rhs = database.count(rhs) != 0; if (!has_lhs && !has_rhs) { sigmap.add(lhs, rhs); diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 4bfbe3614..8590242dc 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -193,7 +193,7 @@ std::string vstringf(const char *fmt, va_list ap) int readsome(std::istream &f, char *s, int n) { - int rc = f.readsome(s, n); + int rc = int(f.readsome(s, n)); // f.readsome() sometimes returns 0 on a non-empty stream.. if (rc == 0) { -- cgit v1.2.3