mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Fixed various VS warnings
This commit is contained in:
parent
85572b05e5
commit
84ffe04075
8 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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()];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue