diff --git a/tgt-stub/stub.c b/tgt-stub/stub.c index 7f8f68adc..00f07b60e 100644 --- a/tgt-stub/stub.c +++ b/tgt-stub/stub.c @@ -225,7 +225,7 @@ static void show_lpm_arithmetic_pins(ivl_lpm_t net) { ivl_nexus_t nex; nex = ivl_lpm_q(net, 0); - fprintf(out, " Q: %p\n", ivl_lpm_q(net, 0)); + fprintf(out, " Q: %p\n", nex); nex = ivl_lpm_data(net, 0); fprintf(out, " DataA: %p\n", nex); @@ -243,7 +243,7 @@ static void show_lpm_abs(ivl_lpm_t net) ivl_lpm_basename(net), width); nex = ivl_lpm_q(net, 0); - fprintf(out, " Q: %p\n", ivl_lpm_q(net, 0)); + fprintf(out, " Q: %p\n", nex); nex = ivl_lpm_data(net, 0); fprintf(out, " D: %p\n", nex); @@ -684,6 +684,7 @@ static void show_lpm_re(ivl_lpm_t net) break; case IVL_LPM_RE_NOR: type = "NOR"; + break; case IVL_LPM_RE_XOR: type = "XOR"; break; diff --git a/vpi/sys_random.c b/vpi/sys_random.c index b45931cb9..1e12d69d3 100644 --- a/vpi/sys_random.c +++ b/vpi/sys_random.c @@ -554,6 +554,7 @@ static PLI_INT32 sys_urandom_range_compiletf(PLI_BYTE8 *name) /* Check that there are at least two arguments. */ arg = vpi_scan(argv); /* This should never be zero. */ + assert(arg); arg = vpi_scan(argv); if (arg == 0) { vpi_printf("ERROR: %s requires two arguments.\n", name); diff --git a/vpi/vams_simparam.c b/vpi/vams_simparam.c index adfb6cb2c..a97fe4670 100644 --- a/vpi/vams_simparam.c +++ b/vpi/vams_simparam.c @@ -214,8 +214,7 @@ static PLI_INT32 simparam_str_calltf(PLI_BYTE8 *name_ext) char path [MAX_STRING_RESULT]; char *ptr = getcwd(path, MAX_STRING_RESULT); if (ptr == NULL) { - ptr = strcpy(path, ""); + strcpy(path, ""); } retval = strdup(path); } else if (strcmp(param, "module") == 0) {