Fix some errors found with cppcheck
This commit is contained in:
parent
1b3da449dc
commit
6c91588d33
|
|
@ -2,7 +2,7 @@
|
|||
// are not used here.
|
||||
|
||||
// target_design()
|
||||
unusedFunction:vvp.c:149
|
||||
unusedFunction:vvp.c:148
|
||||
|
||||
// target_query()
|
||||
unusedFunction:vvp.c:246
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2012 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2002-2015 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
|
||||
|
|
@ -119,7 +119,7 @@ static void draw_lpm_mux_nest(ivl_lpm_t net, const char*muxz)
|
|||
net, select_input);
|
||||
|
||||
for (idx = 0 ; idx < ivl_lpm_size(net) ; idx += 2) {
|
||||
fprintf(vvp_out, "L_%p/0/%d .functor %s %u",
|
||||
fprintf(vvp_out, "L_%p/0/%u .functor %s %u",
|
||||
net, idx/2, muxz, width);
|
||||
fprintf(vvp_out, ", %s", draw_net_input(ivl_lpm_data(net,idx+0)));
|
||||
fprintf(vvp_out, ", %s", draw_net_input(ivl_lpm_data(net,idx+1)));
|
||||
|
|
@ -131,10 +131,10 @@ static void draw_lpm_mux_nest(ivl_lpm_t net, const char*muxz)
|
|||
net, level, select_input, level, level);
|
||||
|
||||
for (idx = 0 ; idx < (ivl_lpm_size(net) >> level); idx += 2) {
|
||||
fprintf(vvp_out, "L_%p/%u/%d .functor %s %u",
|
||||
fprintf(vvp_out, "L_%p/%u/%u .functor %s %u",
|
||||
net, level, idx/2, muxz, width);
|
||||
fprintf(vvp_out, ", L_%p/%d/%d", net, level-1, idx+0);
|
||||
fprintf(vvp_out, ", L_%p/%d/%d", net, level-1, idx+1);
|
||||
fprintf(vvp_out, ", L_%p/%u/%u", net, level-1, idx+0);
|
||||
fprintf(vvp_out, ", L_%p/%u/%u", net, level-1, idx+1);
|
||||
fprintf(vvp_out, ", L_%p/%us", net, level);
|
||||
fprintf(vvp_out, ", C4<>;\n");
|
||||
}
|
||||
|
|
@ -142,14 +142,14 @@ static void draw_lpm_mux_nest(ivl_lpm_t net, const char*muxz)
|
|||
}
|
||||
|
||||
|
||||
fprintf(vvp_out, "L_%p/%ds .part %s, %d, 1; Bit %d of the select\n",
|
||||
fprintf(vvp_out, "L_%p/%us .part %s, %u, 1; Bit %u of the select\n",
|
||||
net, swidth-1, select_input, swidth-1, swidth-1);
|
||||
|
||||
|
||||
fprintf(vvp_out, "L_%p .functor %s %u", net, muxz, width);
|
||||
fprintf(vvp_out, ", L_%p/%d/0", net, swidth-2);
|
||||
fprintf(vvp_out, ", L_%p/%d/1", net, swidth-2);
|
||||
fprintf(vvp_out, ", L_%p/%ds", net, swidth-1);
|
||||
fprintf(vvp_out, ", L_%p/%u/0", net, swidth-2);
|
||||
fprintf(vvp_out, ", L_%p/%u/1", net, swidth-2);
|
||||
fprintf(vvp_out, ", L_%p/%us", net, swidth-1);
|
||||
fprintf(vvp_out, ", C4<>;\n");
|
||||
|
||||
free(select_input);
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,7 @@ static void draw_logic_in_scope(ivl_net_logic_t lptr)
|
|||
}
|
||||
for (pdx = inst; pdx < (unsigned)ninp && pdx < inst+4 ; pdx += 1) {
|
||||
if (level) {
|
||||
fprintf(vvp_out, ", L_%p/%d/%d",
|
||||
fprintf(vvp_out, ", L_%p/%d/%u",
|
||||
lptr, level - 1, pdx*4);
|
||||
} else {
|
||||
fprintf(vvp_out, ", %s", input_strings[pdx]);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ O = sys_table.o sys_convert.o sys_countdrivers.o sys_darray.o sys_deposit.o sys_
|
|||
sys_random.o sys_random_mti.o sys_readmem.o sys_readmem_lex.o sys_scanf.o \
|
||||
sys_sdf.o sys_time.o sys_vcd.o sys_vcdoff.o vcd_priv.o mt19937int.o \
|
||||
sys_priv.o sdf_parse.o sdf_lexor.o stringheap.o vams_simparam.o \
|
||||
table_mod.o table_mod_lexor.o table_mod_parse.o
|
||||
table_mod.o table_mod_parse.o table_mod_lexor.o
|
||||
OPP = vcd_priv2.o
|
||||
|
||||
ifeq (@HAVE_LIBZ@,yes)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
%{
|
||||
/*
|
||||
* Copyright (C) 2011-2014 Cary R. (cygcary@yahoo.com)
|
||||
* Copyright (C) 2011-2015 Cary R. (cygcary@yahoo.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -228,7 +228,7 @@ void yyerror(const char *fmt, ...)
|
|||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "%s:%u: TABLE ERROR: ", in_file_name,
|
||||
fprintf(stderr, "%s:%d: TABLE ERROR: ", in_file_name,
|
||||
yylloc.first_line-1);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
|
|
|
|||
Loading…
Reference in New Issue