diff --git a/cadpli/cadpli.c b/cadpli/cadpli.c index 9a75ab7dd..66b213e56 100644 --- a/cadpli/cadpli.c +++ b/cadpli/cadpli.c @@ -79,7 +79,7 @@ static void thunker_register(void) } } -void (*vlog_startup_routines[])() = { +void (*vlog_startup_routines[])(void) = { thunker_register, 0 }; diff --git a/driver/cflexor.lex b/driver/cflexor.lex index 9d50c4c4f..b0ba1a40b 100644 --- a/driver/cflexor.lex +++ b/driver/cflexor.lex @@ -247,7 +247,7 @@ void cfreset(FILE*fd, const char*path) /* * Modern version of flex (>=2.5.9) can clean up the scanner data. */ -void destroy_lexor() +void destroy_lexor(void) { # ifdef FLEX_SCANNER # if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5 diff --git a/driver/cfparse_misc.h b/driver/cfparse_misc.h index c72886b36..9570f5625 100644 --- a/driver/cfparse_misc.h +++ b/driver/cfparse_misc.h @@ -38,7 +38,7 @@ int cflex(void); int cferror(const char *); int cfparse(void); void switch_to_command_file(const char *); -void destroy_lexor(); +void destroy_lexor(void); char *current_file; #endif diff --git a/driver/main.c b/driver/main.c index 020ca3033..4093ff0f3 100644 --- a/driver/main.c +++ b/driver/main.c @@ -205,7 +205,7 @@ void add_cmd_file(const char* filename) } /* Function to return the top command file name from the FIFO. */ -char *get_cmd_file() +char *get_cmd_file(void) { char *filename; @@ -402,7 +402,7 @@ static int t_preprocess_only(void) * needed to run the command from the configuration file (which is * already parsed for us) so we can handle must of the generic cases. */ -static int t_compile() +static int t_compile(void) { unsigned rc; diff --git a/ivlpp/globals.h b/ivlpp/globals.h index db7d660a5..259823468 100644 --- a/ivlpp/globals.h +++ b/ivlpp/globals.h @@ -22,11 +22,11 @@ # include extern void reset_lexor(FILE*out, char*paths[]); -extern void destroy_lexor(); +extern void destroy_lexor(void); extern void load_precompiled_defines(FILE*src); extern void define_macro(const char*name, const char*value, int keyword, int argc); -extern void free_macros(); +extern void free_macros(void); extern void dump_precompiled_defines(FILE*out); /* These variables contain the include directories to be searched when @@ -54,6 +54,6 @@ extern char dep_mode; extern int verbose_flag; /* This is the entry to the lexer. */ -extern int yylex(); +extern int yylex(void); #endif diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index 9ed6aadff..f7073b58d 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -30,29 +30,29 @@ # include "globals.h" # include "ivl_alloc.h" -static void output_init(); +static void output_init(void); #define YY_USER_INIT output_init() -static void def_start(); -static void def_add_arg(); -static void def_finish(); -static void def_undefine(); -static void do_define(); -static int def_is_done(); +static void def_start(void); +static void def_add_arg(void); +static void def_finish(void); +static void def_undefine(void); +static void do_define(void); +static int def_is_done(void); static int is_defined(const char*name); static int macro_needs_args(const char*name); -static void macro_start_args(); +static void macro_start_args(void); static void macro_add_to_arg(int is_whitespace); -static void macro_finish_arg(); +static void macro_finish_arg(void); static void do_expand(int use_args); static const char* do_magic(const char*name); -static const char* macro_name(); +static const char* macro_name(void); -static void include_filename(); -static void do_include(); +static void include_filename(void); +static void do_include(void); -static int load_next_input(); +static int load_next_input(void); struct include_stack_t { @@ -804,7 +804,7 @@ static /* inline */ char* def_argv(int arg) return def_buf + def_argo[arg]; } -static void check_for_max_args() +static void check_for_max_args(void) { if (def_argc == MAX_DEF_ARG) { @@ -825,14 +825,14 @@ static void def_buf_grow_to_fit(int length) } } -static void def_start() +static void def_start(void) { def_buf_free = def_buf_size; def_argc = 0; def_add_arg(); } -static void def_add_arg() +static void def_add_arg(void) { int length = yyleng; @@ -979,7 +979,7 @@ static void free_macro(struct define_t* def) free(def); } -void free_macros() +void free_macros(void) { free_macro(def_table); } @@ -1052,7 +1052,7 @@ static char *find_arg(char*ptr, char*head, char*arg) * continuation, then return 1 and this function may be called again * to collect another line of the definition. */ -static void do_define() +static void do_define(void) { char* cp; char* head; @@ -1202,7 +1202,7 @@ static void do_define() * Return true if the definition text is done. This is the opposite of * the define_continue_flag. */ -static int def_is_done() +static int def_is_done(void) { return !define_continue_flag; } @@ -1212,7 +1212,7 @@ static int def_is_done() * assigned value to the parsed name. If there is no value, then * assign the string "" (empty string.) */ -static void def_finish() +static void def_finish(void) { define_continue_flag = 0; @@ -1234,7 +1234,7 @@ static void def_finish() def_argc = 0; } -static void def_undefine() +static void def_undefine(void) { struct define_t* cur; struct define_t* tail; @@ -1360,7 +1360,7 @@ static int macro_needs_args(const char*text) } } -static const char* macro_name() +static const char* macro_name(void) { return cur_macro ? cur_macro->name : ""; } @@ -1402,7 +1402,7 @@ static void macro_add_to_arg(int is_white_space) def_buf_free -= length; } -static void macro_finish_arg() +static void macro_finish_arg(void) { char* tail = &def_buf[def_buf_size - def_buf_free]; @@ -1443,7 +1443,7 @@ static void exp_buf_grow_to_fit(int length) } } -static void expand_using_args() +static void expand_using_args(void) { char* head; char* tail; @@ -1687,13 +1687,13 @@ static const char* do_magic(const char*name) * parsing resumes. */ -static void output_init() +static void output_init(void) { if (line_direct_flag) fprintf(yyout, "`line 1 \"%s\" 0\n", istack->path); } -static void include_filename() +static void include_filename(void) { if(standby) { emit_pathline(istack); @@ -1712,7 +1712,7 @@ static void include_filename() standby->comment = NULL; } -static void do_include() +static void do_include(void) { /* standby is defined by include_filename() */ if (standby->path[0] == '/') { @@ -1835,7 +1835,7 @@ static void emit_pathline(struct include_stack_t* isp) fprintf(stderr, "%s:%u: ", isp->path, isp->lineno+1); } -static void lexor_done() +static void lexor_done(void) { while (ifdef_stack) { @@ -1923,7 +1923,7 @@ static void open_input_file(struct include_stack_t*isp) * end of a base file, in which case the next base source file is * opened. */ -static int load_next_input() +static int load_next_input(void) { int line_mask_flag = 0; struct include_stack_t* isp = istack; @@ -2193,7 +2193,7 @@ void reset_lexor(FILE* out, char* paths[]) /* * Modern version of flex (>=2.5.9) can clean up the scanner data. */ -void destroy_lexor() +void destroy_lexor(void) { # ifdef FLEX_SCANNER # if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5 diff --git a/tgt-vlog95/logic_lpm.c b/tgt-vlog95/logic_lpm.c index 3556dba61..2ac5fafc6 100644 --- a/tgt-vlog95/logic_lpm.c +++ b/tgt-vlog95/logic_lpm.c @@ -1201,7 +1201,7 @@ static void emit_lpm_as_ca(ivl_scope_t scope, ivl_lpm_t lpm, if (sign_type != NO_SIGN) fprintf(vlog_out, ")"); } -static void emit_posedge_dff_prim() +static void emit_posedge_dff_prim(void) { fprintf(vlog_out, "\n"); fprintf(vlog_out, "/* Icarus generated UDP to represent a synthesized " diff --git a/tgt-vlog95/stmt.c b/tgt-vlog95/stmt.c index d5c2c037d..98fae285f 100644 --- a/tgt-vlog95/stmt.c +++ b/tgt-vlog95/stmt.c @@ -23,7 +23,7 @@ static unsigned single_indent = 0; -static unsigned get_indent() +static unsigned get_indent(void) { if (single_indent) { single_indent = 0; diff --git a/tgt-vlog95/vlog95_priv.h b/tgt-vlog95/vlog95_priv.h index af0fd9c92..db9522642 100644 --- a/tgt-vlog95/vlog95_priv.h +++ b/tgt-vlog95/vlog95_priv.h @@ -106,10 +106,10 @@ extern void emit_nexus_as_ca(ivl_scope_t scope, ivl_nexus_t nex, extern void emit_nexus_port_driver_as_ca(ivl_scope_t scope, ivl_nexus_t nex); extern void emit_const_nexus(ivl_scope_t scope, ivl_net_const_t const_net); extern void emit_signal_net_const_as_ca(ivl_scope_t scope, ivl_signal_t sig); -extern void emit_icarus_generated_udps(); +extern void emit_icarus_generated_udps(void); extern void add_udp_to_list(ivl_udp_t udp); -extern void emit_udp_list(); +extern void emit_udp_list(void); extern void emit_sig_file_line(ivl_signal_t sig); extern void emit_id(const char *id); @@ -148,7 +148,7 @@ extern void get_sig_msb_lsb(ivl_signal_t sig, int *msb, int *lsb); /* * Cleanup functions. */ -extern void free_emitted_scope_list(); +extern void free_emitted_scope_list(void); /* * Debug routine to dump the various pieces of nexus information. diff --git a/tgt-vvp/draw_net_input.c b/tgt-vvp/draw_net_input.c index 9b4a2e2af..4a1c345be 100644 --- a/tgt-vvp/draw_net_input.c +++ b/tgt-vvp/draw_net_input.c @@ -158,7 +158,7 @@ static char* draw_C8_to_string(ivl_net_const_t cptr, return result; } -static struct vvp_nexus_data*new_nexus_data() +static struct vvp_nexus_data*new_nexus_data(void) { struct vvp_nexus_data*data = calloc(1, sizeof(struct vvp_nexus_data)); return data; diff --git a/tgt-vvp/vvp_priv.h b/tgt-vvp/vvp_priv.h index 40d8d87dc..ef7afe9ba 100644 --- a/tgt-vvp/vvp_priv.h +++ b/tgt-vvp/vvp_priv.h @@ -176,7 +176,7 @@ struct vvp_nexus_data { * cache it. */ extern const char* draw_net_input(ivl_nexus_t nex); -void EOC_cleanup_drivers(); +void EOC_cleanup_drivers(void); /* * This is different from draw_net_input in that it is intended to be diff --git a/vpi/sdf_lexor.lex b/vpi/sdf_lexor.lex index 17d4eeaa1..0b8c7767e 100644 --- a/vpi/sdf_lexor.lex +++ b/vpi/sdf_lexor.lex @@ -213,7 +213,7 @@ static void process_quoted_string(void) /* * Modern version of flex (>=2.5.9) can clean up the scanner data. */ -static void destroy_sdf_lexor() +static void destroy_sdf_lexor(void) { # ifdef FLEX_SCANNER # if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5 diff --git a/vpi/sys_convert.c b/vpi/sys_convert.c index 01f12013f..1b03408e9 100644 --- a/vpi/sys_convert.c +++ b/vpi/sys_convert.c @@ -231,7 +231,7 @@ static PLI_INT32 sys_rtoi_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) return 0; } -void sys_convert_register() +void sys_convert_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_countdrivers.c b/vpi/sys_countdrivers.c index 417d20b5a..390f4eb56 100644 --- a/vpi/sys_countdrivers.c +++ b/vpi/sys_countdrivers.c @@ -196,7 +196,7 @@ args_done: /* * Routine to register the system tasks/functions provided in this file. */ -void sys_countdrivers_register() +void sys_countdrivers_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_deposit.c b/vpi/sys_deposit.c index f2f95f562..a8ad54514 100644 --- a/vpi/sys_deposit.c +++ b/vpi/sys_deposit.c @@ -90,7 +90,7 @@ static PLI_INT32 sys_deposit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) return 0; } -void sys_deposit_register() +void sys_deposit_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_display.c b/vpi/sys_display.c index d452d2065..5a5bc9d43 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -2062,7 +2062,7 @@ static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) return 0; } -void sys_display_register() +void sys_display_register(void) { s_cb_data cb_data; s_vpi_systf_data tf_data; diff --git a/vpi/sys_fileio.c b/vpi/sys_fileio.c index b503d4f81..ec99c9f00 100644 --- a/vpi/sys_fileio.c +++ b/vpi/sys_fileio.c @@ -1056,7 +1056,7 @@ static PLI_INT32 sys_ferror_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) return 0; } -void sys_fileio_register() +void sys_fileio_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_finish.c b/vpi/sys_finish.c index 642765621..cc3a88326 100644 --- a/vpi/sys_finish.c +++ b/vpi/sys_finish.c @@ -46,7 +46,7 @@ static PLI_INT32 sys_finish_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) return 0; } -void sys_finish_register() +void sys_finish_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_plusargs.c b/vpi/sys_plusargs.c index 7f7935aee..357a2d652 100644 --- a/vpi/sys_plusargs.c +++ b/vpi/sys_plusargs.c @@ -381,7 +381,7 @@ static PLI_INT32 sys_value_plusargs_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_plusargs_register() +void sys_plusargs_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_queue.c b/vpi/sys_queue.c index e0be73d71..7c0972b2e 100644 --- a/vpi/sys_queue.c +++ b/vpi/sys_queue.c @@ -1393,7 +1393,7 @@ static PLI_INT32 sys_q_exam_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) /* * Routine to register the system tasks/functions provided in this file. */ -void sys_queue_register() +void sys_queue_register(void) { s_vpi_systf_data tf_data; s_cb_data cb; diff --git a/vpi/sys_random.c b/vpi/sys_random.c index 78546b64f..bd44c7a70 100644 --- a/vpi/sys_random.c +++ b/vpi/sys_random.c @@ -909,7 +909,7 @@ static PLI_INT32 sys_rand_func_sizetf(PLI_BYTE8 *x) return 32; } -void sys_random_register() +void sys_random_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_random_mti.c b/vpi/sys_random_mti.c index 58753ac85..8a20c6164 100644 --- a/vpi/sys_random_mti.c +++ b/vpi/sys_random_mti.c @@ -142,7 +142,7 @@ static PLI_INT32 sys_mti_random_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_random_mti_register() +void sys_random_mti_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_readmem.c b/vpi/sys_readmem.c index b35154a03..15170b31a 100644 --- a/vpi/sys_readmem.c +++ b/vpi/sys_readmem.c @@ -569,7 +569,7 @@ static PLI_INT32 sys_writemem_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_readmem_register() +void sys_readmem_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_readmem_lex.h b/vpi/sys_readmem_lex.h index c638ec6d6..b7e18376a 100644 --- a/vpi/sys_readmem_lex.h +++ b/vpi/sys_readmem_lex.h @@ -30,8 +30,8 @@ extern char *readmem_error_token; extern void sys_readmem_start_file(FILE*in, int bin_flag, unsigned width, struct t_vpi_vecval*val); -extern int readmemlex(); +extern int readmemlex(void); -extern void destroy_readmem_lexor(); +extern void destroy_readmem_lexor(void); #endif diff --git a/vpi/sys_readmem_lex.lex b/vpi/sys_readmem_lex.lex index c7b90f9ba..22e5b0e80 100644 --- a/vpi/sys_readmem_lex.lex +++ b/vpi/sys_readmem_lex.lex @@ -24,9 +24,9 @@ # include "sys_readmem_lex.h" # include -static void make_addr(); -static void make_hex_value(); -static void make_bin_value(); +static void make_addr(void); +static void make_hex_value(void); +static void make_bin_value(void); static int save_state; @@ -60,12 +60,12 @@ char *readmem_error_token = 0; static unsigned word_width = 0; static struct t_vpi_vecval*vecval = 0; -static void make_addr() +static void make_addr(void) { sscanf(yytext+1, "%x", (unsigned int*)&vecval->aval); } -static void make_hex_value() +static void make_hex_value(void) { char*beg = yytext; char*end = beg + strlen(beg); @@ -136,7 +136,7 @@ static void make_hex_value() } } -static void make_bin_value() +static void make_bin_value(void) { char*beg = yytext; char*end = beg + strlen(beg); @@ -195,7 +195,7 @@ void sys_readmem_start_file(FILE*in, int bin_flag, /* * Modern version of flex (>=2.5.9) can clean up the scanner data. */ -void destroy_readmem_lexor() +void destroy_readmem_lexor(void) { # ifdef FLEX_SCANNER # if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5 diff --git a/vpi/sys_scanf.c b/vpi/sys_scanf.c index e400fe947..3e7534cdf 100644 --- a/vpi/sys_scanf.c +++ b/vpi/sys_scanf.c @@ -1435,7 +1435,7 @@ static PLI_INT32 sys_sscanf_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) return 0; } -void sys_scanf_register() +void sys_scanf_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_sdf.c b/vpi/sys_sdf.c index 2ee6c1fe1..5d69ff623 100644 --- a/vpi/sys_sdf.c +++ b/vpi/sys_sdf.c @@ -318,7 +318,7 @@ static PLI_INT32 sys_sdf_annotate_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_sdf_register() +void sys_sdf_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_table.c b/vpi/sys_table.c index 6e9a4326c..bb5e3ad7e 100644 --- a/vpi/sys_table.c +++ b/vpi/sys_table.c @@ -23,42 +23,42 @@ # include # include -extern void sys_convert_register(); -extern void sys_countdrivers_register(); -extern void sys_darray_register(); -extern void sys_fileio_register(); -extern void sys_finish_register(); -extern void sys_deposit_register(); -extern void sys_display_register(); -extern void sys_plusargs_register(); -extern void sys_queue_register(); -extern void sys_random_register(); -extern void sys_random_mti_register(); -extern void sys_readmem_register(); -extern void sys_scanf_register(); -extern void sys_sdf_register(); -extern void sys_time_register(); -extern void sys_vcd_register(); -extern void sys_vcdoff_register(); -extern void sys_special_register(); -extern void table_model_register(); -extern void vams_simparam_register(); +extern void sys_convert_register(void); +extern void sys_countdrivers_register(void); +extern void sys_darray_register(void); +extern void sys_fileio_register(void); +extern void sys_finish_register(void); +extern void sys_deposit_register(void); +extern void sys_display_register(void); +extern void sys_plusargs_register(void); +extern void sys_queue_register(void); +extern void sys_random_register(void); +extern void sys_random_mti_register(void); +extern void sys_readmem_register(void); +extern void sys_scanf_register(void); +extern void sys_sdf_register(void); +extern void sys_time_register(void); +extern void sys_vcd_register(void); +extern void sys_vcdoff_register(void); +extern void sys_special_register(void); +extern void table_model_register(void); +extern void vams_simparam_register(void); #ifdef HAVE_LIBZ #ifdef HAVE_LIBBZ2 -extern void sys_lxt_register(); +extern void sys_lxt_register(void); #else -static void sys_lxt_register() { fputs("LXT support disabled since libbzip2 not available\n",stderr); exit(1); } +static void sys_lxt_register(void) { fputs("LXT support disabled since libbzip2 not available\n",stderr); exit(1); } #endif -extern void sys_lxt2_register(); -extern void sys_fst_register(); +extern void sys_lxt2_register(void); +extern void sys_fst_register(void); #else -static void sys_lxt_register() { fputs("LXT support disabled since zlib not available\n",stderr); exit(1); } -static void sys_lxt2_register() { fputs("LXT2 support disabled since zlib not available\n",stderr); exit(1); } -static void sys_fst_register() { fputs("FST support disabled since zlib not available\n",stderr); exit(1); } +static void sys_lxt_register(void) { fputs("LXT support disabled since zlib not available\n",stderr); exit(1); } +static void sys_lxt2_register(void) { fputs("LXT2 support disabled since zlib not available\n",stderr); exit(1); } +static void sys_fst_register(void) { fputs("FST support disabled since zlib not available\n",stderr); exit(1); } #endif -static void sys_lxt_or_vcd_register() +static void sys_lxt_or_vcd_register(void) { int idx; struct t_vpi_vlog_info vlog_info; @@ -195,7 +195,7 @@ static void sys_lxt_or_vcd_register() } } -void (*vlog_startup_routines[])() = { +void (*vlog_startup_routines[])(void) = { sys_convert_register, sys_countdrivers_register, sys_darray_register, diff --git a/vpi/sys_time.c b/vpi/sys_time.c index e904d2718..18f248a4e 100644 --- a/vpi/sys_time.c +++ b/vpi/sys_time.c @@ -107,7 +107,7 @@ static PLI_INT32 sys_realtime_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_time_register() +void sys_time_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index 62a6f75b5..ea4ccb7b2 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -159,7 +159,7 @@ __inline__ static int dump_header_pending(void) * This function writes out all the traced variables, whether they * changed or not. */ -static void vcd_checkpoint() +static void vcd_checkpoint(void) { struct vcd_info*cur; @@ -167,7 +167,7 @@ static void vcd_checkpoint() show_this_item(cur); } -static void vcd_checkpoint_x() +static void vcd_checkpoint_x(void) { struct vcd_info*cur; @@ -855,7 +855,7 @@ static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_vcd_register() +void sys_vcd_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/sys_vcdoff.c b/vpi/sys_vcdoff.c index 1ce71f709..1c487a864 100644 --- a/vpi/sys_vcdoff.c +++ b/vpi/sys_vcdoff.c @@ -48,7 +48,7 @@ static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_vcdoff_register() +void sys_vcdoff_register(void) { s_vpi_systf_data tf_data; vpiHandle res; diff --git a/vpi/table_mod.c b/vpi/table_mod.c index 9a3c00416..34d23862a 100644 --- a/vpi/table_mod.c +++ b/vpi/table_mod.c @@ -64,7 +64,7 @@ static PLI_INT32 cleanup_table_mod(p_cb_data cause) * Create an empty table model object and add it to the list of table * model objects. */ -static p_table_mod create_table() +static p_table_mod create_table(void) { /* Create an empty table model object. */ p_table_mod obj = (p_table_mod) malloc(sizeof(s_table_mod)); @@ -110,7 +110,7 @@ unsigned is_const_string_obj(vpiHandle arg) /* * Get any command line flags. For now we only have a debug flag. */ -static void check_command_line_flags() +static void check_command_line_flags(void) { struct t_vpi_vlog_info vlog_info; static unsigned command_line_processed = 0; @@ -684,7 +684,7 @@ static PLI_INT32 sys_table_model_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) /* * Routine to register the system function provided in this file. */ -void table_model_register() +void table_model_register(void) { s_vpi_systf_data tf_data; s_cb_data cb; diff --git a/vpi/table_mod.h b/vpi/table_mod.h index 35a513404..e1215dfa9 100644 --- a/vpi/table_mod.h +++ b/vpi/table_mod.h @@ -94,8 +94,8 @@ typedef struct t_table_mod { extern unsigned parse_table_model(FILE *fp, vpiHandle callh, p_table_mod table); -extern int tblmodlex(); -extern void destroy_tblmod_lexor(); +extern int tblmodlex(void); +extern void destroy_tblmod_lexor(void); extern void init_tblmod_lexor(FILE *fp); #endif diff --git a/vpi/table_mod_lexor.lex b/vpi/table_mod_lexor.lex index 738c644fe..bd518ee7e 100644 --- a/vpi/table_mod_lexor.lex +++ b/vpi/table_mod_lexor.lex @@ -150,7 +150,7 @@ void init_tblmod_lexor(FILE *fp) /* * Modern version of flex (>=2.5.9) can clean up the scanner data. */ -void destroy_tblmod_lexor() +void destroy_tblmod_lexor(void) { # ifdef FLEX_SCANNER # if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5 diff --git a/vpi/table_mod_parse.y b/vpi/table_mod_parse.y index fb1ff4f18..c1f5f6c25 100644 --- a/vpi/table_mod_parse.y +++ b/vpi/table_mod_parse.y @@ -90,7 +90,7 @@ static p_table_mod table_def; extern int tblmodlex(void); static void yyerror(const char *fmt, ...); -static void process_point() +static void process_point(void) { assert(cur_value == indep_values); #if 0 diff --git a/vpi/v2005_math.c b/vpi/v2005_math.c index 4306faccf..ab8fabf2e 100644 --- a/vpi/v2005_math.c +++ b/vpi/v2005_math.c @@ -371,7 +371,7 @@ static void sys_v2005_math_register(void) /* * Hook to get Icarus Verilog to find the registration function. */ -extern void sys_clog2_register(); +extern void sys_clog2_register(void); void (*vlog_startup_routines[])(void) = { sys_v2005_math_register, diff --git a/vpi/v2009_table.c b/vpi/v2009_table.c index 1b1b3d226..4e3328779 100644 --- a/vpi/v2009_table.c +++ b/vpi/v2009_table.c @@ -21,7 +21,7 @@ extern void v2009_array_register(void); extern void v2009_enum_register(void); extern void v2009_string_register(void); -void (*vlog_startup_routines[])() = { +void (*vlog_startup_routines[])(void) = { v2009_array_register, v2009_enum_register, v2009_string_register, diff --git a/vpi/vcd_priv.h b/vpi/vcd_priv.h index ea96642b3..5c3219648 100644 --- a/vpi/vcd_priv.h +++ b/vpi/vcd_priv.h @@ -45,7 +45,7 @@ EXTERN const char *vcd_names_search(struct vcd_names_list_s*tab, EXTERN void vcd_names_sort(struct vcd_names_list_s*tab); -EXTERN void vcd_names_delete(); +EXTERN void vcd_names_delete(struct vcd_names_list_s*tab); /* * Keep a map of nexus ident's to help with alias detection. @@ -53,7 +53,7 @@ EXTERN void vcd_names_delete(); EXTERN const char*find_nexus_ident(int nex); EXTERN void set_nexus_ident(int nex, const char *id); -EXTERN void nexus_ident_delete(); +EXTERN void nexus_ident_delete(void); /* * Keep a set of scope names to help with duplicate detection. diff --git a/vpi/vhdl_table.c b/vpi/vhdl_table.c index 4e80e1444..764a18c97 100644 --- a/vpi/vhdl_table.c +++ b/vpi/vhdl_table.c @@ -182,7 +182,7 @@ static void vhdl_register(void) vpi_register_cb(&cb); } -void (*vlog_startup_routines[])() = { +void (*vlog_startup_routines[])(void) = { vhdl_register, 0 }; diff --git a/vpi/vpi_debug.c b/vpi/vpi_debug.c index 4a4515b43..495648ab4 100644 --- a/vpi/vpi_debug.c +++ b/vpi/vpi_debug.c @@ -93,7 +93,7 @@ static PLI_INT32 vpi_tree_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -void sys_register() +void sys_register(void) { s_vpi_systf_data tf_data; vpiHandle res; @@ -108,7 +108,7 @@ void sys_register() vpip_make_systf_system_defined(res); } -void (*vlog_startup_routines[])() = { +void (*vlog_startup_routines[])(void) = { sys_register, 0 }; diff --git a/vvp/draw_tt.c b/vvp/draw_tt.c index d969012f0..10a5da89d 100644 --- a/vvp/draw_tt.c +++ b/vvp/draw_tt.c @@ -25,7 +25,7 @@ * map of a 4-vbit value to a hex digit. The table handles the display * of x, X, z, Z, etc. */ -static void draw_hex_table() +static void draw_hex_table(void) { unsigned idx; @@ -71,7 +71,7 @@ static void draw_hex_table() printf("};\n"); } -static void draw_oct_table() +static void draw_oct_table(void) { unsigned idx; @@ -117,7 +117,7 @@ static void draw_oct_table() printf("};\n"); } -int main() +int main(void) { draw_hex_table(); draw_oct_table(); diff --git a/vvp/libvpi.c b/vvp/libvpi.c index 30ff2eaa4..df6388f17 100644 --- a/vvp/libvpi.c +++ b/vvp/libvpi.c @@ -21,6 +21,6 @@ * Things that should be statically linked by VPI modules go here. */ -void __libvpi_c_dummy_function() +void __libvpi_c_dummy_function(void) { }