More lint removal
tgt-vvp/eval_expr.c uninitialized variables vpi/sys_display.c uninitialized variables vvp/vpi_priv.cc deprecated string constant usage vvp/vpi_vthr_vector.cc deprecated string constant usage the last entry invokes vpip_name_string() and uses const char * in the same way as the other 9 callers in vvp/*.cc, the only difference is that the argument is static instead of computed.
This commit is contained in:
parent
6c5773c0e3
commit
e6ea5cd409
|
|
@ -731,8 +731,8 @@ static struct vector_info draw_binary_expr_le(ivl_expr_t exp,
|
|||
assert(ivl_expr_value(re) == IVL_VT_LOGIC
|
||||
|| ivl_expr_value(re) == IVL_VT_BOOL);
|
||||
|
||||
lv.wid = 0;
|
||||
rv.wid = 0;
|
||||
lv.wid = 0; lv.base=0;
|
||||
rv.wid = 0; rv.base=0;
|
||||
|
||||
switch (ivl_expr_opcode(exp)) {
|
||||
case 'G':
|
||||
|
|
|
|||
|
|
@ -1590,6 +1590,7 @@ static unsigned int get_format_char(char **rtn, int ljust, int plus,
|
|||
case 'u':
|
||||
case 'U':
|
||||
*idx += 1;
|
||||
size = 0; /* fallback value if errors */
|
||||
if (ljust != 0 || plus != 0 || ld_zero != 0 || width != -1 ||
|
||||
prec != -1) {
|
||||
vpi_printf("WARNING: invalid format %s%s.\n", info->name, fmtb);
|
||||
|
|
@ -1661,6 +1662,7 @@ static unsigned int get_format_char(char **rtn, int ljust, int plus,
|
|||
case 'z':
|
||||
case 'Z':
|
||||
*idx += 1;
|
||||
size = 0; /* fallback value if errors */
|
||||
if (ljust != 0 || plus != 0 || ld_zero != 0 || width != -1 ||
|
||||
prec != -1) {
|
||||
vpi_printf("WARNING: invalid format %s%s.\n", info->name, fmtb);
|
||||
|
|
@ -2161,6 +2163,7 @@ static PLI_INT32 sys_printtimescale_calltf(PLI_BYTE8*xx)
|
|||
vpiHandle scope;
|
||||
if (!argv) {
|
||||
vpiHandle parent = vpi_handle(vpiScope, sys);
|
||||
scope = NULL; /* fallback value if parent is NULL */
|
||||
while (parent) {
|
||||
scope = parent;
|
||||
parent = vpi_handle(vpiScope, scope);
|
||||
|
|
@ -2169,7 +2172,7 @@ static PLI_INT32 sys_printtimescale_calltf(PLI_BYTE8*xx)
|
|||
scope = vpi_scan(argv);
|
||||
vpi_free_object(argv);
|
||||
}
|
||||
|
||||
|
||||
vpi_printf("Time scale of (%s) is ", vpi_get_str(vpiFullName, scope));
|
||||
vpi_printf("%s / ", pts_convert(vpi_get(vpiTimeUnit, scope)));
|
||||
vpi_printf("%s\n", pts_convert(vpi_get(vpiTimePrecision, scope)));
|
||||
|
|
|
|||
|
|
@ -399,8 +399,10 @@ PLI_INT32 vpi_get_vlog_info(p_vpi_vlog_info vlog_info_p)
|
|||
|
||||
void vpi_set_vlog_info(int argc, char** argv)
|
||||
{
|
||||
vpi_vlog_info.product = "Icarus Verilog";
|
||||
vpi_vlog_info.version = "$Name: $";
|
||||
static char icarus_product[] = "Icarus Verilog";
|
||||
static char icarus_version[] = "$Name: $";
|
||||
vpi_vlog_info.product = icarus_product;
|
||||
vpi_vlog_info.version = icarus_version;
|
||||
vpi_vlog_info.argc = argc;
|
||||
vpi_vlog_info.argv = argv;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ struct __vpiVThrVec {
|
|||
unsigned bas;
|
||||
unsigned wid;
|
||||
unsigned signed_flag : 1;
|
||||
char *name;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
inline static
|
||||
|
|
@ -427,14 +427,14 @@ vpiHandle vpip_make_vthr_vector(unsigned base, unsigned wid, bool signed_flag)
|
|||
assert(wid < 65536);
|
||||
obj->wid = wid;
|
||||
obj->signed_flag = signed_flag? 1 : 0;
|
||||
obj->name = "T<>";
|
||||
obj->name = vpip_name_string("T<>");
|
||||
|
||||
return &obj->base;
|
||||
}
|
||||
|
||||
struct __vpiVThrWord {
|
||||
struct __vpiHandle base;
|
||||
char* name;
|
||||
const char* name;
|
||||
int subtype;
|
||||
unsigned index;
|
||||
};
|
||||
|
|
@ -545,7 +545,7 @@ vpiHandle vpip_make_vthr_word(unsigned base, const char*type)
|
|||
assert(type[0] == 'r');
|
||||
|
||||
obj->base.vpi_type = &vpip_vthr_const_real_rt;
|
||||
obj->name = "W<>";
|
||||
obj->name = vpip_name_string("W<>");
|
||||
obj->subtype = vpiRealConst;
|
||||
assert(base < 65536);
|
||||
obj->index = base;
|
||||
|
|
|
|||
Loading…
Reference in New Issue