3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Fixed some visual studio warnings

This commit is contained in:
Clifford Wolf 2016-02-13 17:31:24 +01:00
parent 6f1d694171
commit bcc873b805
8 changed files with 10 additions and 10 deletions

View file

@ -74,7 +74,7 @@ template<> struct hash_ops<int32_t> : hash_int_ops
template<> struct hash_ops<int64_t> : 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));
}
};

View file

@ -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);

View file

@ -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) {