Fix some warnings from msys2 build
This commit is contained in:
parent
abaa32f793
commit
47cf3707fc
|
|
@ -372,7 +372,7 @@ bool NetAssign::eval_func_lval_(const LineInfo&loc,
|
|||
if (op_) {
|
||||
for (unsigned idx = 0 ; idx < lpart.len() ; idx += 1) {
|
||||
long ldx = base + idx;
|
||||
if (ldx >= 0 && ldx < lval_v.len())
|
||||
if (ldx >= 0 && (unsigned long)ldx < lval_v.len())
|
||||
lpart.set(idx, lval_v[ldx]);
|
||||
}
|
||||
eval_func_lval_op_(loc, lpart, rval_v);
|
||||
|
|
@ -381,7 +381,7 @@ bool NetAssign::eval_func_lval_(const LineInfo&loc,
|
|||
}
|
||||
for (unsigned idx = 0 ; idx < lpart.len() ; idx += 1) {
|
||||
long ldx = base + idx;
|
||||
if (ldx >= 0 && ldx < lval_v.len())
|
||||
if (ldx >= 0 && (unsigned long)ldx < lval_v.len())
|
||||
lval_v.set(idx+base, lpart[idx]);
|
||||
}
|
||||
|
||||
|
|
@ -1071,7 +1071,7 @@ NetExpr* NetESelect::evaluate_function(const LineInfo&loc,
|
|||
verinum res (verinum::Vx, expr_width());
|
||||
for (unsigned idx = 0 ; idx < res.len() ; idx += 1) {
|
||||
long sdx = base + idx;
|
||||
if (sdx >= 0 && sdx < sub.len())
|
||||
if (sdx >= 0 && (unsigned long)sdx < sub.len())
|
||||
res.set(idx, sub[sdx]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2010-2024 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -65,7 +65,8 @@ bool netenum_t::insert_name(size_t name_idx, perm_string name, const verinum&val
|
|||
{
|
||||
std::pair<std::map<perm_string,verinum>::iterator, bool> res;
|
||||
|
||||
assert(val.has_len() && val.len() == packed_width());
|
||||
assert(val.has_len() && packed_width() >= 0 &&
|
||||
val.len() == (unsigned long)packed_width());
|
||||
|
||||
// Insert a map of the name to the value. This also gets a
|
||||
// flag that returns true if the name is unique, or false
|
||||
|
|
|
|||
|
|
@ -2318,7 +2318,8 @@ NetEConst::NetEConst(ivl_type_t type, const verinum&val)
|
|||
: NetExpr(type), value_(val)
|
||||
{
|
||||
ivl_assert(*this, type->packed());
|
||||
ivl_assert(*this, type->packed_width() == val.len());
|
||||
ivl_assert(*this, type->packed_width() >= 0 &&
|
||||
(unsigned long)type->packed_width() == val.len());
|
||||
ivl_assert(*this, type->get_signed() == val.has_sign());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2021 Martin Whitaker (icarus@martin-whitaker.me.uk)
|
||||
* Copyright (c) 2019-2024 Martin Whitaker (icarus@martin-whitaker.me.uk)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -220,6 +220,7 @@ vpip_routines_s vpi_routines = {
|
|||
.chk_error = vpi_chk_error,
|
||||
.compare_objects = vpi_compare_objects,
|
||||
.free_object = vpi_free_object,
|
||||
.release_handle = vpi_release_handle,
|
||||
.get_vlog_info = vpi_get_vlog_info,
|
||||
.vcontrol = vpi_vcontrol,
|
||||
.fopen = vpi_fopen,
|
||||
|
|
|
|||
Loading…
Reference in New Issue