From 0fd5a7976060c3ccbe3f4dd948d77ffbf2763a02 Mon Sep 17 00:00:00 2001 From: steve Date: Sun, 15 Feb 2004 18:03:30 +0000 Subject: [PATCH] Cleanup of warnings. --- driver/cfparse_misc.h | 7 ++++++- driver/main.c | 8 +++++++- ivlpp/lexor.lex | 3 ++- ivlpp/main.c | 6 +++++- tgt-fpga/d-virtex.c | 7 +++++-- tgt-fpga/xilinx.c | 9 ++++++--- tgt-verilog/verilog.c | 13 ++++++++----- vpi/sys_convert.c | 21 ++++++++++++--------- 8 files changed, 51 insertions(+), 23 deletions(-) diff --git a/driver/cfparse_misc.h b/driver/cfparse_misc.h index 66eac90ad..927428e00 100644 --- a/driver/cfparse_misc.h +++ b/driver/cfparse_misc.h @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: cfparse_misc.h,v 1.5 2003/09/26 21:25:58 steve Exp $" +#ident "$Id: cfparse_misc.h,v 1.6 2004/02/15 18:03:30 steve Exp $" #endif /* @@ -38,10 +38,15 @@ struct cfltype { # define YYLTYPE struct cfltype extern YYLTYPE yylloc; +int cflex(void); +int cferror(const char *); int cfparse(void); /* * $Log: cfparse_misc.h,v $ + * Revision 1.6 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.5 2003/09/26 21:25:58 steve * Warnings cleanup. * diff --git a/driver/main.c b/driver/main.c index 43cc184fb..9f4d1cd07 100644 --- a/driver/main.c +++ b/driver/main.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: main.c,v 1.62 2003/12/12 04:36:48 steve Exp $" +#ident "$Id: main.c,v 1.63 2004/02/15 18:03:30 steve Exp $" #endif # include "config.h" @@ -89,6 +89,7 @@ extern const char*optarg; #endif # include "globals.h" +#include "cfparse_misc.h" /* cfparse() */ #ifdef __MINGW32__ const char sep = '\\'; @@ -213,7 +214,9 @@ static const char*my_tempfile(const char*str, FILE**fout) static int t_default(char*cmd, unsigned ncmd) { unsigned rc; +#ifdef __MINGW32__ unsigned ncmd_start = ncmd; +#endif snprintf(tmp, sizeof tmp, " | %s/ivl", base); rc = strlen(tmp); @@ -711,6 +714,9 @@ int main(int argc, char **argv) /* * $Log: main.c,v $ + * Revision 1.63 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.62 2003/12/12 04:36:48 steve * Fix make check to support -tconf configuration method. * diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index dc80e696c..acf10ae19 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: lexor.lex,v 1.42 2003/09/26 02:08:31 steve Exp $" +#ident "$Id: lexor.lex,v 1.43 2004/02/15 18:03:30 steve Exp $" #endif # include "config.h" @@ -30,6 +30,7 @@ #endif # include # include +# include # include # include "parse.h" diff --git a/ivlpp/main.c b/ivlpp/main.c index 52adf7f39..1ad499278 100644 --- a/ivlpp/main.c +++ b/ivlpp/main.c @@ -17,7 +17,7 @@ const char COPYRIGHT[] = * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: main.c,v 1.17 2003/09/26 02:08:31 steve Exp $" +#ident "$Id: main.c,v 1.18 2004/02/15 18:03:30 steve Exp $" #endif # include "config.h" @@ -47,6 +47,7 @@ const char VERSION[] = "$Name: $ $State: Exp $"; #endif # include # include +# include #if defined(HAVE_GETOPT_H) # include #endif @@ -288,6 +289,9 @@ int main(int argc, char*argv[]) /* * $Log: main.c,v $ + * Revision 1.18 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.17 2003/09/26 02:08:31 steve * Detect missing endif markers. * diff --git a/tgt-fpga/d-virtex.c b/tgt-fpga/d-virtex.c index 304b0f59c..8dc2eb298 100644 --- a/tgt-fpga/d-virtex.c +++ b/tgt-fpga/d-virtex.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: d-virtex.c,v 1.33 2003/11/12 03:20:14 steve Exp $" +#ident "$Id: d-virtex.c,v 1.34 2004/02/15 18:03:30 steve Exp $" #endif # include "device.h" @@ -80,7 +80,7 @@ static void virtex_or_wide(ivl_net_logic_t net) edif_cell_t cell_lut4 = xilinx_cell_lut4(xlib); edif_cellref_t true_out, false_out; - edif_cellref_t lut, muxcy, muxcy_down; + edif_cellref_t lut, muxcy, muxcy_down=NULL; edif_joint_t jnt; unsigned idx, inputs, lut4_cnt; @@ -846,6 +846,9 @@ const struct device_s d_virtex_edif = { /* * $Log: d-virtex.c,v $ + * Revision 1.34 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.33 2003/11/12 03:20:14 steve * devices need show_cmp_gt * diff --git a/tgt-fpga/xilinx.c b/tgt-fpga/xilinx.c index ed7885bfb..6684febe5 100644 --- a/tgt-fpga/xilinx.c +++ b/tgt-fpga/xilinx.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: xilinx.c,v 1.11 2004/02/10 16:39:33 steve Exp $" +#ident "$Id: xilinx.c,v 1.12 2004/02/15 18:03:30 steve Exp $" #endif # include "edif.h" @@ -546,9 +546,9 @@ static void edif_cellref_logic(ivl_net_logic_t net, const char*def) static void lut_logic(ivl_net_logic_t net, const char*init3, const char*init4, const char*init5) { - edif_cellref_t lut; + edif_cellref_t lut = NULL; /* initialization shuts up gcc -Wall */ edif_joint_t jnt; - const char* init; + const char* init = NULL; /* ditto */ assert(ivl_logic_pins(net) <= 5); assert(ivl_logic_pins(net) >= 3); @@ -951,6 +951,9 @@ void xilinx_shiftl(ivl_lpm_t net) /* * $Log: xilinx.c,v $ + * Revision 1.12 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.11 2004/02/10 16:39:33 steve * Fix direction of Q/D signals of FD devices. * diff --git a/tgt-verilog/verilog.c b/tgt-verilog/verilog.c index 99ee0efcc..96d3cbe37 100644 --- a/tgt-verilog/verilog.c +++ b/tgt-verilog/verilog.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: verilog.c,v 1.27 2002/08/12 01:35:03 steve Exp $" +#ident "$Id: verilog.c,v 1.28 2004/02/15 18:03:30 steve Exp $" #endif # include "config.h" @@ -78,8 +78,8 @@ static void draw_scoped_objects(ivl_design_t des) */ static void draw_nexus(ivl_nexus_t nex) { - ivl_signal_t sig; - ivl_nexus_ptr_t ptr; + ivl_signal_t sig=NULL; + ivl_nexus_ptr_t ptr=NULL; unsigned idx; for (idx = 0 ; idx < ivl_nexus_ptrs(nex) ; idx += 1) { @@ -236,10 +236,10 @@ static void show_assign_lval(ivl_lval_t lval) { ivl_nexus_t nex; ivl_nexus_ptr_t ptr; - ivl_signal_t sig; + ivl_signal_t sig=NULL; unsigned idx; - unsigned lsb; + unsigned lsb=0; assert(ivl_lval_mux(lval) == 0); assert(ivl_lval_mem(lval) == 0); @@ -439,6 +439,9 @@ int target_design(ivl_design_t des) /* * $Log: verilog.c,v $ + * Revision 1.28 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.27 2002/08/12 01:35:03 steve * conditional ident string using autoconfig. * diff --git a/vpi/sys_convert.c b/vpi/sys_convert.c index 23d745269..57f154aa4 100644 --- a/vpi/sys_convert.c +++ b/vpi/sys_convert.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: sys_convert.c,v 1.4 2004/01/21 01:22:53 steve Exp $" +#ident "$Id: sys_convert.c,v 1.5 2004/02/15 18:03:30 steve Exp $" #endif # include "vpi_config.h" @@ -247,40 +247,43 @@ void sys_convert_register() s_vpi_systf_data tf_data; tf_data.type = vpiSysFunc; - tf_data.tfname = "$bitstoreal"; + tf_data.user_data = "$bitstoreal"; + tf_data.tfname = tf_data.user_data; tf_data.sizetf = sizetf_64; tf_data.compiletf = sys_convert_compiletf; tf_data.calltf = sys_bitstoreal_calltf; - tf_data.user_data = tf_data.tfname; vpi_register_systf(&tf_data); tf_data.type = vpiSysFunc; - tf_data.tfname = "$itor"; + tf_data.user_data = "$itor"; + tf_data.tfname = tf_data.user_data; tf_data.sizetf = sizetf_64; tf_data.compiletf = sys_convert_compiletf; tf_data.calltf = sys_itor_calltf; - tf_data.user_data = tf_data.tfname; vpi_register_systf(&tf_data); tf_data.type = vpiSysFunc; - tf_data.tfname = "$realtobits"; + tf_data.user_data = "$realtobits"; + tf_data.tfname = tf_data.user_data; tf_data.sizetf = sizetf_64; tf_data.compiletf = sys_convert_compiletf; tf_data.calltf = sys_realtobits_calltf; - tf_data.user_data = tf_data.tfname; vpi_register_systf(&tf_data); tf_data.type = vpiSysFunc; - tf_data.tfname = "$rtoi"; + tf_data.user_data = "$rtoi"; + tf_data.tfname = tf_data.user_data; tf_data.sizetf = sizetf_32; tf_data.compiletf = sys_convert_compiletf; tf_data.calltf = sys_rtoi_calltf; - tf_data.user_data = tf_data.tfname; vpi_register_systf(&tf_data); } /* * $Log: sys_convert.c,v $ + * Revision 1.5 2004/02/15 18:03:30 steve + * Cleanup of warnings. + * * Revision 1.4 2004/01/21 01:22:53 steve * Give the vip directory its own configure and vpi_config.h *