Remove some scan-build warnings.
One of these is a real bug, the others are just minor optimizations.
This commit is contained in:
parent
b9af189229
commit
f5acd8d135
|
|
@ -229,7 +229,7 @@ static void show_lpm_arithmetic_pins(ivl_lpm_t net)
|
||||||
{
|
{
|
||||||
ivl_nexus_t nex;
|
ivl_nexus_t nex;
|
||||||
nex = ivl_lpm_q(net);
|
nex = ivl_lpm_q(net);
|
||||||
fprintf(out, " Q: %p\n", ivl_lpm_q(net));
|
fprintf(out, " Q: %p\n", nex);
|
||||||
|
|
||||||
nex = ivl_lpm_data(net, 0);
|
nex = ivl_lpm_data(net, 0);
|
||||||
fprintf(out, " DataA: %p\n", nex);
|
fprintf(out, " DataA: %p\n", nex);
|
||||||
|
|
@ -247,7 +247,7 @@ static void show_lpm_abs(ivl_lpm_t net)
|
||||||
ivl_lpm_basename(net), width);
|
ivl_lpm_basename(net), width);
|
||||||
|
|
||||||
nex = ivl_lpm_q(net);
|
nex = ivl_lpm_q(net);
|
||||||
fprintf(out, " Q: %p\n", ivl_lpm_q(net));
|
fprintf(out, " Q: %p\n", nex);
|
||||||
|
|
||||||
nex = ivl_lpm_data(net, 0);
|
nex = ivl_lpm_data(net, 0);
|
||||||
fprintf(out, " D: %p\n", nex);
|
fprintf(out, " D: %p\n", nex);
|
||||||
|
|
@ -690,6 +690,7 @@ static void show_lpm_re(ivl_lpm_t net)
|
||||||
break;
|
break;
|
||||||
case IVL_LPM_RE_NOR:
|
case IVL_LPM_RE_NOR:
|
||||||
type = "NOR";
|
type = "NOR";
|
||||||
|
break;
|
||||||
case IVL_LPM_RE_XOR:
|
case IVL_LPM_RE_XOR:
|
||||||
type = "XOR";
|
type = "XOR";
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -567,6 +567,7 @@ static PLI_INT32 sys_urandom_range_compiletf(ICARUS_VPI_CONST PLI_BYTE8 *name)
|
||||||
|
|
||||||
/* Check that there are at least two arguments. */
|
/* Check that there are at least two arguments. */
|
||||||
arg = vpi_scan(argv); /* This should never be zero. */
|
arg = vpi_scan(argv); /* This should never be zero. */
|
||||||
|
assert(arg);
|
||||||
arg = vpi_scan(argv);
|
arg = vpi_scan(argv);
|
||||||
if (arg == 0) {
|
if (arg == 0) {
|
||||||
vpi_printf("ERROR: %s requires two arguments.\n", name);
|
vpi_printf("ERROR: %s requires two arguments.\n", name);
|
||||||
|
|
|
||||||
|
|
@ -214,8 +214,7 @@ static PLI_INT32 simparam_str_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name_ext)
|
||||||
char path [MAX_STRING_RESULT];
|
char path [MAX_STRING_RESULT];
|
||||||
char *ptr = getcwd(path, MAX_STRING_RESULT);
|
char *ptr = getcwd(path, MAX_STRING_RESULT);
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
ptr = strcpy(path, "<error getting the cwd, "
|
strcpy(path, "<error getting the cwd, is it too long?>");
|
||||||
"is it too long?>");
|
|
||||||
}
|
}
|
||||||
retval = strdup(path);
|
retval = strdup(path);
|
||||||
} else if (strcmp(param, "module") == 0) {
|
} else if (strcmp(param, "module") == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue