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
|
assert(ivl_expr_value(re) == IVL_VT_LOGIC
|
||||||
|| ivl_expr_value(re) == IVL_VT_BOOL);
|
|| ivl_expr_value(re) == IVL_VT_BOOL);
|
||||||
|
|
||||||
lv.wid = 0;
|
lv.wid = 0; lv.base=0;
|
||||||
rv.wid = 0;
|
rv.wid = 0; rv.base=0;
|
||||||
|
|
||||||
switch (ivl_expr_opcode(exp)) {
|
switch (ivl_expr_opcode(exp)) {
|
||||||
case 'G':
|
case 'G':
|
||||||
|
|
|
||||||
|
|
@ -1590,6 +1590,7 @@ static unsigned int get_format_char(char **rtn, int ljust, int plus,
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'U':
|
case 'U':
|
||||||
*idx += 1;
|
*idx += 1;
|
||||||
|
size = 0; /* fallback value if errors */
|
||||||
if (ljust != 0 || plus != 0 || ld_zero != 0 || width != -1 ||
|
if (ljust != 0 || plus != 0 || ld_zero != 0 || width != -1 ||
|
||||||
prec != -1) {
|
prec != -1) {
|
||||||
vpi_printf("WARNING: invalid format %s%s.\n", info->name, fmtb);
|
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':
|
||||||
case 'Z':
|
case 'Z':
|
||||||
*idx += 1;
|
*idx += 1;
|
||||||
|
size = 0; /* fallback value if errors */
|
||||||
if (ljust != 0 || plus != 0 || ld_zero != 0 || width != -1 ||
|
if (ljust != 0 || plus != 0 || ld_zero != 0 || width != -1 ||
|
||||||
prec != -1) {
|
prec != -1) {
|
||||||
vpi_printf("WARNING: invalid format %s%s.\n", info->name, fmtb);
|
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;
|
vpiHandle scope;
|
||||||
if (!argv) {
|
if (!argv) {
|
||||||
vpiHandle parent = vpi_handle(vpiScope, sys);
|
vpiHandle parent = vpi_handle(vpiScope, sys);
|
||||||
|
scope = NULL; /* fallback value if parent is NULL */
|
||||||
while (parent) {
|
while (parent) {
|
||||||
scope = parent;
|
scope = parent;
|
||||||
parent = vpi_handle(vpiScope, scope);
|
parent = vpi_handle(vpiScope, 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)
|
void vpi_set_vlog_info(int argc, char** argv)
|
||||||
{
|
{
|
||||||
vpi_vlog_info.product = "Icarus Verilog";
|
static char icarus_product[] = "Icarus Verilog";
|
||||||
vpi_vlog_info.version = "$Name: $";
|
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.argc = argc;
|
||||||
vpi_vlog_info.argv = argv;
|
vpi_vlog_info.argv = argv;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ struct __vpiVThrVec {
|
||||||
unsigned bas;
|
unsigned bas;
|
||||||
unsigned wid;
|
unsigned wid;
|
||||||
unsigned signed_flag : 1;
|
unsigned signed_flag : 1;
|
||||||
char *name;
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline static
|
inline static
|
||||||
|
|
@ -427,14 +427,14 @@ vpiHandle vpip_make_vthr_vector(unsigned base, unsigned wid, bool signed_flag)
|
||||||
assert(wid < 65536);
|
assert(wid < 65536);
|
||||||
obj->wid = wid;
|
obj->wid = wid;
|
||||||
obj->signed_flag = signed_flag? 1 : 0;
|
obj->signed_flag = signed_flag? 1 : 0;
|
||||||
obj->name = "T<>";
|
obj->name = vpip_name_string("T<>");
|
||||||
|
|
||||||
return &obj->base;
|
return &obj->base;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct __vpiVThrWord {
|
struct __vpiVThrWord {
|
||||||
struct __vpiHandle base;
|
struct __vpiHandle base;
|
||||||
char* name;
|
const char* name;
|
||||||
int subtype;
|
int subtype;
|
||||||
unsigned index;
|
unsigned index;
|
||||||
};
|
};
|
||||||
|
|
@ -545,7 +545,7 @@ vpiHandle vpip_make_vthr_word(unsigned base, const char*type)
|
||||||
assert(type[0] == 'r');
|
assert(type[0] == 'r');
|
||||||
|
|
||||||
obj->base.vpi_type = &vpip_vthr_const_real_rt;
|
obj->base.vpi_type = &vpip_vthr_const_real_rt;
|
||||||
obj->name = "W<>";
|
obj->name = vpip_name_string("W<>");
|
||||||
obj->subtype = vpiRealConst;
|
obj->subtype = vpiRealConst;
|
||||||
assert(base < 65536);
|
assert(base < 65536);
|
||||||
obj->index = base;
|
obj->index = base;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue