From 774d173d69be88b7ce7e9abe714863022a203524 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 9 Jul 2014 14:16:57 -0700 Subject: [PATCH] Remove missing parameter warnings --- driver/cfparse.y | 1 + libveriuser/a_fetch_dir.c | 3 ++- libveriuser/a_fetch_location.c | 3 ++- libveriuser/a_fetch_type_str.c | 3 ++- libveriuser/a_handle_hiconn.c | 3 ++- libveriuser/a_next_bit.c | 4 +++- libveriuser/a_next_port.c | 4 +++- libveriuser/a_vcl.c | 6 +++++- libveriuser/delay.c | 3 ++- libveriuser/exprinfo.c | 4 +++- libveriuser/getsimtime.c | 8 +++++++- libveriuser/io_print.c | 4 +++- libveriuser/nodeinfo.c | 4 +++- libveriuser/veriusertfs.c | 4 +++- tgt-null/null.c | 5 +++-- tgt-stub/stub.c | 8 ++++++-- tgt-vlog95/expr.c | 26 +++++++++++++------------- tgt-vlog95/logic_lpm.c | 2 +- tgt-vlog95/misc.c | 4 ++-- tgt-vlog95/scope.c | 2 +- tgt-vlog95/stmt.c | 2 +- tgt-vvp/eval_expr.c | 6 ++++++ tgt-vvp/eval_object.c | 1 + tgt-vvp/vvp_process.c | 15 +++++++++++++++ vpi/sys_clog2.c | 6 +++--- vpi/sys_convert.c | 30 +++++++++++++++++++++++------- vpi/sys_countdrivers.c | 4 +++- vpi/sys_darray.c | 4 +++- vpi/sys_deposit.c | 4 +++- vpi/sys_display.c | 19 +++++++++++++++++-- vpi/sys_fst.c | 13 ++++++++++++- vpi/sys_lxt.c | 13 ++++++++++++- vpi/sys_lxt2.c | 16 +++++++++++++++- vpi/sys_plusargs.c | 4 +++- vpi/sys_queue.c | 10 ++++++++++ vpi/sys_random.c | 23 ++++++++++++++++++++++- vpi/sys_random_mti.c | 5 +++++ vpi/sys_readmem.c | 4 +++- vpi/sys_vcd.c | 13 ++++++++++++- vpi/sys_vcdoff.c | 4 +++- vpi/table_mod.c | 7 +++++-- vpi/v2005_math.c | 8 +++++--- vpi/v2009_enum.c | 4 +++- vpi/v2009_string.c | 4 +++- vpi/va_math.c | 8 +++++--- vpi/vams_simparam.c | 5 ++--- vpi/vhdl_table.c | 10 ++++++---- vpi/vpi_debug.c | 5 ++++- 48 files changed, 272 insertions(+), 76 deletions(-) diff --git a/driver/cfparse.y b/driver/cfparse.y index 493694ead..4653ba560 100644 --- a/driver/cfparse.y +++ b/driver/cfparse.y @@ -270,5 +270,6 @@ skip_arg : TOK_PLUSARG int yyerror(const char*msg) { + (void)msg; /* Parameter is not used. */ return 0; } diff --git a/libveriuser/a_fetch_dir.c b/libveriuser/a_fetch_dir.c index 52db2f704..3dc6081c7 100644 --- a/libveriuser/a_fetch_dir.c +++ b/libveriuser/a_fetch_dir.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@picturel.com) + * Copyright (c) 2003-2014 Stephen Williams (steve@picturel.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 @@ -25,6 +25,7 @@ PLI_INT32 acc_fetch_direction(handle obj) { + (void)obj; /* Parameter is not used. */ if (pli_trace) { fprintf(pli_trace, "acc_fetch_direction: enter.\n"); fflush(pli_trace); diff --git a/libveriuser/a_fetch_location.c b/libveriuser/a_fetch_location.c index 1e078a6a3..28577c9d2 100644 --- a/libveriuser/a_fetch_location.c +++ b/libveriuser/a_fetch_location.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -22,6 +22,7 @@ int acc_fetch_location(p_location loc, handle obj) { + (void)obj; /* Parameter is not used. */ loc->line_no = 0; loc->filename = ""; return 1; diff --git a/libveriuser/a_fetch_type_str.c b/libveriuser/a_fetch_type_str.c index d74a2714e..52b0c829a 100644 --- a/libveriuser/a_fetch_type_str.c +++ b/libveriuser/a_fetch_type_str.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -46,5 +46,6 @@ const char* acc_fetch_type_str(PLI_INT32 type) */ PLI_INT32 acc_fetch_paramtype(handle obj) { + (void)obj; /* Parameter is not used. */ return 0; } diff --git a/libveriuser/a_handle_hiconn.c b/libveriuser/a_handle_hiconn.c index 2b54647ea..e147b471e 100644 --- a/libveriuser/a_handle_hiconn.c +++ b/libveriuser/a_handle_hiconn.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@picturel.com) + * Copyright (c) 2003-2014 Stephen Williams (steve@picturel.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 @@ -25,6 +25,7 @@ handle acc_handle_hiconn(handle obj) { + (void)obj; /* Parameter is not used. */ if (pli_trace) { fprintf(pli_trace, "acc_handle_hiconn: enter.\n"); fflush(pli_trace); diff --git a/libveriuser/a_next_bit.c b/libveriuser/a_next_bit.c index cc9316c05..04ec7a759 100644 --- a/libveriuser/a_next_bit.c +++ b/libveriuser/a_next_bit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@picturel.com) + * Copyright (c) 2003-2014 Stephen Williams (steve@picturel.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 @@ -25,6 +25,8 @@ handle acc_next_bit(handle ref, handle bit) { + (void)ref; /* Parameter is not used. */ + (void)bit; /* Parameter is not used. */ if (pli_trace) { fprintf(pli_trace, "acc_next_bit: enter.\n"); fflush(pli_trace); diff --git a/libveriuser/a_next_port.c b/libveriuser/a_next_port.c index e0950b3fa..f65565b80 100644 --- a/libveriuser/a_next_port.c +++ b/libveriuser/a_next_port.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -25,6 +25,8 @@ handle acc_next_port(handle ref, handle bit) { + (void)ref; /* Parameter is not used. */ + (void)bit; /* Parameter is not used. */ if (pli_trace) { fprintf(pli_trace, "acc_next_port: enter.\n"); fflush(pli_trace); diff --git a/libveriuser/a_vcl.c b/libveriuser/a_vcl.c index e7bec8b93..132ba6c2b 100644 --- a/libveriuser/a_vcl.c +++ b/libveriuser/a_vcl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -196,5 +196,9 @@ void acc_vcl_add(handle obj, PLI_INT32(*consumer)(p_vc_record), void acc_vcl_delete(handle obj, PLI_INT32(*consumer)(p_vc_record), void*data, PLI_INT32 vcl_flag) { + (void)obj; /* Parameter is not used. */ + (void)consumer; /* Parameter is not used. */ + (void)data; /* Parameter is not used. */ + (void)vcl_flag; /* Parameter is not used. */ vpi_printf("XXXX acc_vcl_delete(...)\n"); } diff --git a/libveriuser/delay.c b/libveriuser/delay.c index 2aa47b3ce..31c03b9d0 100644 --- a/libveriuser/delay.c +++ b/libveriuser/delay.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -24,6 +24,7 @@ static PLI_INT32 delay_callback(struct t_cb_data*cb) { + (void)cb; /* Parameter is not used. */ vpi_printf("XXXX delay_callback called.\n"); return 0; } diff --git a/libveriuser/exprinfo.c b/libveriuser/exprinfo.c index 314b3d5fb..219a884c5 100644 --- a/libveriuser/exprinfo.c +++ b/libveriuser/exprinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -25,6 +25,8 @@ struct t_tfexprinfo* tf_exprinfo(PLI_INT32 a, struct t_tfexprinfo*ip) { + (void)a; /* Parameter is not used. */ + (void)ip; /* Parameter is not used. */ if (pli_trace) { fprintf(pli_trace, "tf_exprinfo: enter.\n"); fflush(pli_trace); diff --git a/libveriuser/getsimtime.c b/libveriuser/getsimtime.c index d833cf38b..9b18638fb 100644 --- a/libveriuser/getsimtime.c +++ b/libveriuser/getsimtime.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2011 Michael Ruff (mruff at chiaro.com) + * Copyright (c) 2002-2014 Michael Ruff (mruff at chiaro.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 @@ -146,6 +146,8 @@ void tf_unscale_longdelay(void*obj, PLI_INT32 low, PLI_INT32 high, ivl_u64_t unscaled; vpiHandle hand = vpi_handle(vpiScope, vpi_handle(vpiSysTfCall,0)); + (void)obj; /* Parameter is not used. */ + unscaled = high; unscaled = (unscaled << 32) | low; unscaled *= pow(10, vpi_get(vpiTimeUnit, hand) - @@ -159,6 +161,8 @@ void tf_scale_realdelay(void*obj, double real, double *areal) { vpiHandle hand = vpi_handle(vpiScope, vpi_handle(vpiSysTfCall,0)); + (void)obj; /* Parameter is not used. */ + *areal = real / pow(10, vpi_get(vpiTimeUnit, hand) - vpi_get(vpiTimePrecision, 0)); } @@ -167,6 +171,8 @@ void tf_unscale_realdelay(void*obj, double real, double *areal) { vpiHandle hand = vpi_handle(vpiScope, vpi_handle(vpiSysTfCall,0)); + (void)obj; /* Parameter is not used. */ + *areal = real * pow(10, vpi_get(vpiTimeUnit, hand) - vpi_get(vpiTimePrecision, 0)); } diff --git a/libveriuser/io_print.c b/libveriuser/io_print.c index f72cb6405..f23eb4ef7 100644 --- a/libveriuser/io_print.c +++ b/libveriuser/io_print.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 Michael Ruff (mruff at chiaro.com) + * Copyright (c) 2002-2014 Michael Ruff (mruff at chiaro.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 @@ -58,6 +58,8 @@ PLI_INT32 tf_message(PLI_INT32 level, char*facility, { va_list ap; + (void)level; /* Parameter is not used. */ + vpi_printf("%s[%s] ", facility, messno); va_start(ap, fmt); diff --git a/libveriuser/nodeinfo.c b/libveriuser/nodeinfo.c index d421c7ae5..49582d89f 100644 --- a/libveriuser/nodeinfo.c +++ b/libveriuser/nodeinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -25,6 +25,8 @@ struct t_tfnoeinfo* tf_nodeinfo(PLI_INT32 a, struct t_tfnodeinfo*ip) { + (void)a; /* Parameter is not used. */ + (void)ip; /* Parameter is not used. */ if (pli_trace) { fprintf(pli_trace, "tf_nodeinfo: enter.\n"); fflush(pli_trace); diff --git a/libveriuser/veriusertfs.c b/libveriuser/veriusertfs.c index 4f804ccf0..979b2b5d3 100644 --- a/libveriuser/veriusertfs.c +++ b/libveriuser/veriusertfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2013 Michael Ruff (mruff at chiaro.com) + * Copyright (c) 2002-2014 Michael Ruff (mruff at chiaro.com) * Michael Runyan (mrunyan at chiaro.com) * * This source code is free software; you can redistribute it @@ -57,6 +57,8 @@ static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) { unsigned idx; + (void)cb_data; /* Parameter is not used. */ + for (idx = 0; idx < udata_count; idx += 1) { free(udata_store[idx]); } diff --git a/tgt-null/null.c b/tgt-null/null.c index 35f2869ca..184fba111 100644 --- a/tgt-null/null.c +++ b/tgt-null/null.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008 Stephen Williams (steve@icarus.com) + * Copyright (c) 2000-2014 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 @@ -30,7 +30,7 @@ static const char*version_string = "Icarus Verilog NULL Code Generator " VERSION " (" VERSION_TAG ")\n\n" -"Copyright (c) 2000-2008 Stephen Williams (steve@icarus.com)\n\n" +"Copyright (c) 2000-2014 Stephen Williams (steve@icarus.com)\n\n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" " the Free Software Foundation; either version 2 of the License, or\n" @@ -49,6 +49,7 @@ static const char*version_string = int target_design(ivl_design_t des) { + (void)des; /* Parameter is not used. */ return 0; } diff --git a/tgt-stub/stub.c b/tgt-stub/stub.c index d3b932a41..4468c131f 100644 --- a/tgt-stub/stub.c +++ b/tgt-stub/stub.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 2000-2014 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 @@ -36,7 +36,7 @@ static const char*version_string = "Icarus Verilog STUB Code Generator " VERSION " (" VERSION_TAG ")\n\n" -"Copyright (c) 2000-2011 Stephen Williams (steve@icarus.com)\n\n" +"Copyright (c) 2000-2014 Stephen Williams (steve@icarus.com)\n\n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" " the Free Software Foundation; either version 2 of the License, or\n" @@ -1067,6 +1067,8 @@ static int show_process(ivl_process_t net, void*x) { unsigned idx; + (void)x; /* Parameter is not used. */ + switch (ivl_process_type(net)) { case IVL_PR_INITIAL: if (ivl_process_analog(net)) @@ -1591,6 +1593,8 @@ static int show_scope(ivl_scope_t net, void*x) unsigned idx; const char *is_auto; + (void)x; /* Parameter is not used. */ + fprintf(out, "scope: %s (%u parameters, %u signals, %u logic)", ivl_scope_name(net), ivl_scope_params(net), ivl_scope_sigs(net), ivl_scope_logs(net)); diff --git a/tgt-vlog95/expr.c b/tgt-vlog95/expr.c index 31b38963d..95979983f 100644 --- a/tgt-vlog95/expr.c +++ b/tgt-vlog95/expr.c @@ -293,7 +293,7 @@ static unsigned emit_power_as_shift(ivl_scope_t scope, ivl_expr_t expr, unsigned expr_wid; ivl_expr_t lval = ivl_expr_oper1(expr); ivl_expr_t rval = ivl_expr_oper2(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ /* The L-value must be a number. */ if (ivl_expr_type(lval) != IVL_EX_NUMBER) return 0; /* The L-value must of the form 2^n. */ @@ -358,7 +358,7 @@ static unsigned emit_power_as_shift(ivl_scope_t scope, ivl_expr_t expr, static void emit_expr_array(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { ivl_signal_t sig = ivl_expr_signal(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ emit_scope_call_path(scope, ivl_signal_scope(sig)); emit_id(ivl_signal_basename(sig)); } @@ -561,7 +561,7 @@ static void emit_expr_concat(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) unsigned repeat = ivl_expr_repeat(expr); unsigned idx, count = ivl_expr_parms(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ if (repeat != 1) fprintf(vlog_out, "{%u", repeat); fprintf(vlog_out, "{"); count -= 1; @@ -576,7 +576,7 @@ static void emit_expr_concat(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) static void emit_expr_delay(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ emit_scaled_delay(scope, ivl_expr_delay_val(expr)); } @@ -587,7 +587,7 @@ static void emit_expr_event(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { ivl_event_t event = ivl_expr_event(expr); ivl_scope_t ev_scope = ivl_event_scope(event); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ assert(! ivl_event_nany(event)); assert(! ivl_event_npos(event)); assert(! ivl_event_nneg(event)); @@ -603,7 +603,7 @@ static void emit_expr_event(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) static void emit_expr_number(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { ivl_parameter_t param = ivl_expr_parameter(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ if (param && (param != emitting_param)) { emit_scope_call_path(scope, ivl_parameter_scope(param)); emit_id(ivl_parameter_basename(param)); @@ -618,7 +618,7 @@ static void emit_expr_real_number(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { ivl_parameter_t param = ivl_expr_parameter(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ if (param && (param != emitting_param)) { emit_scope_call_path(scope, ivl_parameter_scope(param)); emit_id(ivl_parameter_basename(param)); @@ -633,7 +633,7 @@ static void emit_expr_real_number(ivl_scope_t scope, ivl_expr_t expr, void emit_class_property(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { ivl_signal_t sig = ivl_expr_signal(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ emit_scope_call_path(scope, ivl_signal_scope(sig)); emit_id(ivl_signal_basename(sig)); fprintf(vlog_out, ".%s", ivl_expr_name(expr)); @@ -652,8 +652,8 @@ static void emit_expr_scope_piece(ivl_scope_t scope) static void emit_expr_scope(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { - (void)scope; /* scope is not used. */ - (void)wid; /* wid is not used. */ + (void)scope; /* Parameter is not used. */ + (void)wid; /* Parameter is not used. */ emit_expr_scope_piece(ivl_expr_scope(expr)); } @@ -854,7 +854,7 @@ static void emit_expr_select(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) ivl_expr_t sel_expr = ivl_expr_oper2(expr); ivl_expr_t sig_expr = ivl_expr_oper1(expr); ivl_select_type_t sel_type = ivl_expr_sel_type(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ /* If this is a dynamic array select, translate it differently. */ if ((ivl_expr_type(sig_expr) == IVL_EX_SIGNAL) && (ivl_signal_data_type(ivl_expr_signal(sig_expr)) == IVL_VT_DARRAY)) { @@ -934,7 +934,7 @@ static void emit_expr_select(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) static void emit_expr_func(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { unsigned count = ivl_expr_parms(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ if (count) { unsigned idx; fprintf(vlog_out, "("); @@ -957,7 +957,7 @@ static void emit_expr_func(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) static void emit_expr_signal(ivl_scope_t scope, ivl_expr_t expr, unsigned wid) { ivl_signal_t sig = ivl_expr_signal(expr); - (void)wid; /* wid is not used. */ + (void)wid; /* Parameter is not used. */ emit_scope_call_path(scope, ivl_signal_scope(sig)); emit_id(ivl_signal_basename(sig)); if (ivl_signal_dimensions(sig)) { diff --git a/tgt-vlog95/logic_lpm.c b/tgt-vlog95/logic_lpm.c index 25f6292d3..457ea648c 100644 --- a/tgt-vlog95/logic_lpm.c +++ b/tgt-vlog95/logic_lpm.c @@ -738,7 +738,7 @@ static ivl_signal_t find_output_signal(ivl_scope_t scope, ivl_nexus_t nex, unsigned*array_word) { unsigned idx, count = ivl_nexus_ptrs(nex); - (void)array_word; /* array_word is not used. */ + (void)array_word; /* Parameter is not used. */ for (idx = 0; idx < count; idx += 1) { ivl_nexus_ptr_t nex_ptr = ivl_nexus_ptr(nex, idx); ivl_signal_t t_sig = ivl_nexus_ptr_sig(nex_ptr); diff --git a/tgt-vlog95/misc.c b/tgt-vlog95/misc.c index d49428bac..7b2f96119 100644 --- a/tgt-vlog95/misc.c +++ b/tgt-vlog95/misc.c @@ -369,7 +369,7 @@ void emit_scaled_range(ivl_scope_t scope, ivl_expr_t expr, unsigned width, int rtype; int64_t value = get_in_range_int64_from_number(expr, &rtype, "range value"); - (void)scope; /* scope is not used. */ + (void)scope; /* Parameter is not used. */ if (rtype < 0) fprintf(vlog_out, "[1'bx:1'bx]"); if (rtype) return; @@ -690,7 +690,7 @@ static unsigned is_local_input(ivl_scope_t scope, ivl_nexus_t nex) ivl_signal_t sig = 0; unsigned idx, count = ivl_nexus_ptrs(nex); - (void)scope; /* scope is not used. */ + (void)scope; /* Parameter is not used. */ for (idx = 0; idx < count; idx += 1) { ivl_nexus_ptr_t nex_ptr = ivl_nexus_ptr(nex, idx); ivl_signal_t t_sig = ivl_nexus_ptr_sig(nex_ptr); diff --git a/tgt-vlog95/scope.c b/tgt-vlog95/scope.c index 93f750e90..382187d1f 100644 --- a/tgt-vlog95/scope.c +++ b/tgt-vlog95/scope.c @@ -725,7 +725,7 @@ static int find_tf_process(ivl_process_t proc, ivl_scope_t scope) static int emit_tf_process(ivl_scope_t scope, ivl_scope_t parent) { ivl_scope_type_t sc_type = ivl_scope_type(scope); - (void)parent; /* parent is not used. */ + (void)parent; /* Parameter is not used. */ if ((sc_type == IVL_SCT_FUNCTION) || (sc_type == IVL_SCT_TASK)) { /* Output the initial/always blocks for this module. */ ivl_design_process(design, (ivl_process_f)find_tf_process, scope); diff --git a/tgt-vlog95/stmt.c b/tgt-vlog95/stmt.c index fb0109ffa..1e3b06613 100644 --- a/tgt-vlog95/stmt.c +++ b/tgt-vlog95/stmt.c @@ -1429,7 +1429,7 @@ static void emit_stmt_utask(ivl_scope_t scope, ivl_statement_t stmt) /* Look to see if this is a SystemVerilog wait fork statement. */ static unsigned is_wait_fork(ivl_scope_t scope, ivl_statement_t stmt) { - (void)scope; /* scope is not used. */ + (void)scope; /* Parameter is not used. */ if (ivl_stmt_nevent(stmt) != 1) return 0; if (ivl_stmt_events(stmt, 0) != 0) return 0; assert(ivl_statement_type(ivl_stmt_sub_stmt(stmt)) == IVL_ST_NOOP); diff --git a/tgt-vvp/eval_expr.c b/tgt-vvp/eval_expr.c index 0b84bb96f..4f1d2bda3 100644 --- a/tgt-vvp/eval_expr.c +++ b/tgt-vvp/eval_expr.c @@ -2484,6 +2484,8 @@ static struct vector_info draw_select_array(ivl_expr_t sube, struct vector_info shiv; struct vector_info res; + (void)bit_width; /* Parameter is not used. */ + shiv = draw_eval_expr(bit_idx, STUFF_OK_XZ|STUFF_OK_RO); draw_eval_expr_into_integer(ix, 3); label = local_count++; @@ -2623,6 +2625,8 @@ static void draw_select_signal_dest(ivl_expr_t expr, struct vector_info tmp; ivl_signal_t sig = ivl_expr_signal(sube); + (void)stuff_ok_flag; /* Parameter is not used. */ + /* Special case: If the operand is a signal (not an array) and the part select is coming from the LSB, and the part select is no larger than the signal itself, then we can load the @@ -2661,6 +2665,8 @@ static struct vector_info draw_select_unsized_literal(ivl_expr_t expr, ivl_expr_t sube = ivl_expr_oper1(expr); ivl_expr_t shift = ivl_expr_oper2(expr); + (void)stuff_ok_flag; /* Parameter is not used. */ + assert(!ivl_expr_sized(sube)); res.wid = wid; diff --git a/tgt-vvp/eval_object.c b/tgt-vvp/eval_object.c index 9482c9cc6..4f4a97296 100644 --- a/tgt-vvp/eval_object.c +++ b/tgt-vvp/eval_object.c @@ -162,6 +162,7 @@ static int eval_class_new(ivl_expr_t ex) static int eval_object_null(ivl_expr_t ex) { + (void)ex; /* Parameter is not used. */ fprintf(vvp_out, " %%null;\n"); return 0; } diff --git a/tgt-vvp/vvp_process.c b/tgt-vvp/vvp_process.c index 59eeb7cbc..ee0fb1f46 100644 --- a/tgt-vvp/vvp_process.c +++ b/tgt-vvp/vvp_process.c @@ -1364,6 +1364,8 @@ static int show_stmt_disable(ivl_statement_t net, ivl_scope_t sscope) int rc = 0; ivl_scope_t target = ivl_stmt_call(net); + (void)sscope; /* Parameter is not used. */ + /* A normal disable statement. */ if (target) { show_stmt_file_line(net, "Disable statement."); @@ -1574,6 +1576,7 @@ static int show_stmt_free(ivl_statement_t net) */ static int show_stmt_noop(ivl_statement_t net) { + (void)net; /* Parameter is not used. */ return 0; } @@ -1853,6 +1856,8 @@ static unsigned is_delayed_or_event_assign(ivl_scope_t scope, ivl_expr_t rval; ivl_signal_t lsig, rsig; + (void)scope; /* Parameter is not used. */ + /* We must have two block elements. */ if (ivl_stmt_block_count(stmt) != 2) return 0; /* The first must be an assign. */ @@ -1918,6 +1923,8 @@ static unsigned is_repeat_event_assign(ivl_scope_t scope, ivl_expr_t rval; ivl_signal_t lsig, rsig; + (void)scope; /* Parameter is not used. */ + /* We must have three block elements. */ if (ivl_stmt_block_count(stmt) != 3) return 0; /* The first must be an assign. */ @@ -1979,6 +1986,9 @@ static unsigned is_wait(ivl_scope_t scope, ivl_statement_t stmt) ivl_statement_t while_wait, wait, wait_stmt; ivl_expr_t while_expr, expr; const char *bits; + + (void)scope; /* Parameter is not used. */ + /* We must have two block elements. */ if (ivl_stmt_block_count(stmt) != 2) return 0; /* The first must be a while. */ @@ -2119,6 +2129,9 @@ static unsigned is_utask_call_with_args(ivl_scope_t scope, unsigned lineno = ivl_stmt_lineno(stmt); ivl_scope_t task_scope = 0; port_expr_t port_exprs; + + (void)scope; /* Parameter is not used. */ + /* Check to see if the block is of the basic form first. */ for (idx = 0; idx < count; idx += 1) { ivl_statement_t tmp = ivl_stmt_block_stmt(stmt, idx); @@ -2350,6 +2363,8 @@ int draw_process(ivl_process_t net, void*x) int push_flag = 0; + (void)x; /* Parameter is not used. */ + for (idx = 0 ; idx < ivl_process_attr_cnt(net) ; idx += 1) { ivl_attribute_t attr = ivl_process_attr_val(net, idx); diff --git a/vpi/sys_clog2.c b/vpi/sys_clog2.c index e19aeecc4..84a685271 100644 --- a/vpi/sys_clog2.c +++ b/vpi/sys_clog2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2008-2014 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 @@ -71,7 +71,7 @@ static PLI_INT32 sys_clog2_compiletf(ICARUS_VPI_CONST PLI_BYTE8 *name) assert(callh != 0); argv = vpi_iterate(vpiArgument, callh); - (void) name; /* Not used! */ + (void)name; /* Parameter is not used. */ /* We must have an argument. */ if (argv == 0) { @@ -120,7 +120,7 @@ static PLI_INT32 sys_clog2_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) vpiHandle arg; s_vpi_value val; s_vpi_vecval vec; - (void) name; /* Not used! */ + (void)name; /* Parameter is not used. */ /* Get the argument. */ arg = vpi_scan(argv); diff --git a/vpi/sys_convert.c b/vpi/sys_convert.c index 1b03408e9..389e3c764 100644 --- a/vpi/sys_convert.c +++ b/vpi/sys_convert.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2013 Michael Ruff (mruff at chiaro.com) + * Copyright (c) 2003-2014 Michael Ruff (mruff at chiaro.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 @@ -90,8 +90,16 @@ static void error_message(vpiHandle callh, const char* msg) vpi_control(vpiFinish, 1); } -static PLI_INT32 sizetf_32 (PLI_BYTE8*x) { return 32; } -static PLI_INT32 sizetf_64 (PLI_BYTE8*x) { return 64; } +static PLI_INT32 sizetf_32 (PLI_BYTE8*name) +{ + (void)name; /* Parameter is not used. */ + return 32; +} +static PLI_INT32 sizetf_64 (PLI_BYTE8*name) +{ + (void)name; /* Parameter is not used. */ + return 64; +} static PLI_INT32 sys_convert_compiletf(ICARUS_VPI_CONST PLI_BYTE8*name) { @@ -123,7 +131,7 @@ static PLI_INT32 sys_convert_compiletf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -static PLI_INT32 sys_bitstoreal_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) +static PLI_INT32 sys_bitstoreal_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle arg = (vpiHandle) vpi_get_userdata(callh); @@ -131,6 +139,8 @@ static PLI_INT32 sys_bitstoreal_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) PLI_UINT32 bits[2]; + (void)name; /* Parameter is not used. */ + /* get value */ value.format = vpiVectorVal; vpi_get_value(arg, &value); @@ -147,12 +157,14 @@ static PLI_INT32 sys_bitstoreal_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) return 0; } -static PLI_INT32 sys_itor_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) +static PLI_INT32 sys_itor_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle arg = (vpiHandle) vpi_get_userdata(callh); s_vpi_value value; + (void)name; /* Parameter is not used. */ + /* get value */ value.format = vpiIntVal; vpi_get_value(arg, &value); @@ -167,7 +179,7 @@ static PLI_INT32 sys_itor_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) return 0; } -static PLI_INT32 sys_realtobits_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) +static PLI_INT32 sys_realtobits_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle arg = (vpiHandle) vpi_get_userdata(callh); @@ -176,6 +188,8 @@ static PLI_INT32 sys_realtobits_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) PLI_UINT32 bits[2]; + (void)name; /* Parameter is not used. */ + /* get value */ value.format = vpiRealVal; vpi_get_value(arg, &value); @@ -197,7 +211,7 @@ static PLI_INT32 sys_realtobits_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) return 0; } -static PLI_INT32 sys_rtoi_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) +static PLI_INT32 sys_rtoi_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle arg = (vpiHandle) vpi_get_userdata(callh); @@ -205,6 +219,8 @@ static PLI_INT32 sys_rtoi_calltf(ICARUS_VPI_CONST PLI_BYTE8*user) static struct t_vpi_vecval res; double val; + (void)name; /* Parameter is not used. */ + /* get value */ value.format = vpiRealVal; vpi_get_value(arg, &value); diff --git a/vpi/sys_countdrivers.c b/vpi/sys_countdrivers.c index 390f4eb56..3eedc431e 100644 --- a/vpi/sys_countdrivers.c +++ b/vpi/sys_countdrivers.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Martin Whitaker. (icarus@martin-whitaker.me.uk) + * Copyright (C) 2012-2014 Martin Whitaker. (icarus@martin-whitaker.me.uk) * * 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 @@ -137,6 +137,8 @@ static PLI_INT32 sys_countdrivers_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) unsigned num_drivers; s_vpi_value val; + (void)name; /* Parameter is not used. */ + /* All returned values are integers. */ val.format = vpiIntVal; diff --git a/vpi/sys_darray.c b/vpi/sys_darray.c index 3031252a3..b4cd2f54e 100644 --- a/vpi/sys_darray.c +++ b/vpi/sys_darray.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 2012-2014 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 @@ -57,6 +57,8 @@ static PLI_INT32 size_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) vpiHandle argv; vpiHandle arg; + (void)name; /* Parameter is not used. */ + argv = vpi_iterate(vpiArgument, callh); assert(argv); arg = vpi_scan(argv); diff --git a/vpi/sys_deposit.c b/vpi/sys_deposit.c index a8ad54514..222f94487 100644 --- a/vpi/sys_deposit.c +++ b/vpi/sys_deposit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2014 Stephen Williams (steve@icarus.com) * Copyright (c) 2000 Stephan Boettcher * * This source code is free software; you can redistribute it @@ -74,6 +74,8 @@ static PLI_INT32 sys_deposit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) vpiHandle callh, argv, target, value; s_vpi_value val; + (void)name; /* Parameter is not used. */ + callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); target = vpi_scan(argv); diff --git a/vpi/sys_display.c b/vpi/sys_display.c index 5a5bc9d43..4cfdfcbdb 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -1399,6 +1399,8 @@ static PLI_INT32 monitor_cb_2(p_cb_data cb) char* result; unsigned int size, location=0; + (void)cb; /* Parameter is not used. */ + /* Because %u and %z may put embedded NULL characters into the * returned string strlen() may not match the real size! */ result = get_display(&size, &monitor_info); @@ -1428,6 +1430,8 @@ static PLI_INT32 monitor_cb_1(p_cb_data cause) struct t_cb_data cb; struct t_vpi_time timerec; + (void)cause; /* Parameter is not used. */ + if (monitor_enabled == 0) return 0; if (monitor_scheduled) return 0; @@ -1465,6 +1469,8 @@ static PLI_INT32 sys_monitor_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) struct t_cb_data cb; struct t_vpi_time timerec; + (void)name; /* Parameter is not used. */ + callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -1544,6 +1550,7 @@ static PLI_INT32 sys_monitor_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 sys_monitoron_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ monitor_enabled = 1; monitor_cb_1(0); return 0; @@ -1551,6 +1558,7 @@ static PLI_INT32 sys_monitoron_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 sys_monitoroff_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ monitor_enabled = 0; return 0; } @@ -1722,6 +1730,7 @@ static PLI_INT32 sys_sformat_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) static PLI_INT32 sys_end_of_compile(p_cb_data cb_data) { + (void)cb_data; /* Parameter is not used. */ /* The default timeformat prints times in unit of simulation precision. */ free(timeformat_info.suff); @@ -1808,12 +1817,14 @@ static PLI_INT32 sys_timeformat_compiletf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -static PLI_INT32 sys_timeformat_calltf(ICARUS_VPI_CONST PLI_BYTE8*xx) +static PLI_INT32 sys_timeformat_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { s_vpi_value value; vpiHandle sys = vpi_handle(vpiSysTfCall, 0); vpiHandle argv = vpi_iterate(vpiArgument, sys); + (void)name; /* Parameter is not used. */ + if (argv) { vpiHandle units = vpi_scan(argv); vpiHandle prec = vpi_scan(argv); @@ -1920,11 +1931,14 @@ static PLI_INT32 sys_printtimescale_compiletf(ICARUS_VPI_CONST PLI_BYTE8*name) return 0; } -static PLI_INT32 sys_printtimescale_calltf(ICARUS_VPI_CONST PLI_BYTE8*xx) +static PLI_INT32 sys_printtimescale_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle argv = vpi_iterate(vpiArgument, callh); vpiHandle item, scope; + + (void)name; /* Parameter is not used. */ + if (!argv) { item = sys_func_module(callh); } else { @@ -2049,6 +2063,7 @@ static PLI_INT32 sys_severity_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) { + (void)cb_data; /* Parameter is not used. */ free(monitor_callbacks); monitor_callbacks = 0; free(monitor_info.filename); diff --git a/vpi/sys_fst.c b/vpi/sys_fst.c index a4ba03f7d..1ed7b7fa0 100644 --- a/vpi/sys_fst.c +++ b/vpi/sys_fst.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2013 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2014 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 @@ -282,6 +282,8 @@ static PLI_INT32 sys_dumpoff_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; dump_is_off = 1; @@ -309,6 +311,8 @@ static PLI_INT32 sys_dumpon_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (!dump_is_off) return 0; dump_is_off = 0; @@ -336,6 +340,8 @@ static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; if (dump_file == 0) return 0; if (dump_header_pending()) return 0; @@ -443,6 +449,7 @@ static PLI_INT32 sys_dumpfile_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 sys_dumpflush_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ if (dump_file) fstWriterFlushContext(dump_file); return 0; @@ -454,6 +461,8 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) vpiHandle argv = vpi_iterate(vpiArgument, callh); s_vpi_value val; + (void)name; /* Parameter is not used. */ + /* Get the value and set the dump limit. */ val.format = vpiIntVal; vpi_get_value(vpi_scan(argv), &val); @@ -787,6 +796,8 @@ static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_value value; unsigned depth = 0; + (void)name; /* Parameter is not used. */ + if (dump_file == 0) { open_dumpfile(callh); if (dump_file == 0) { diff --git a/vpi/sys_lxt.c b/vpi/sys_lxt.c index 66d5d5e24..86068a8ee 100644 --- a/vpi/sys_lxt.c +++ b/vpi/sys_lxt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2013 Stephen Williams (steve@icarus.com) + * Copyright (c) 2002-2014 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 @@ -354,6 +354,8 @@ static PLI_INT32 sys_dumpoff_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; dump_is_off = 1; @@ -381,6 +383,8 @@ static PLI_INT32 sys_dumpon_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (!dump_is_off) return 0; dump_is_off = 0; @@ -408,6 +412,8 @@ static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; if (dump_file == 0) return 0; if (dump_header_pending()) return 0; @@ -501,6 +507,7 @@ static PLI_INT32 sys_dumpfile_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) */ static PLI_INT32 sys_dumpflush_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ return 0; } @@ -510,6 +517,8 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) vpiHandle argv = vpi_iterate(vpiArgument, callh); s_vpi_value val; + (void)name; /* Parameter is not used. */ + /* Get the value and set the dump limit. */ val.format = vpiIntVal; vpi_get_value(vpi_scan(argv), &val); @@ -727,6 +736,8 @@ static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_value value; unsigned depth = 0; + (void)name; /* Parameter is not used. */ + if (dump_file == 0) { open_dumpfile(callh); if (dump_file == 0) { diff --git a/vpi/sys_lxt2.c b/vpi/sys_lxt2.c index 87044a8ee..8babb0382 100644 --- a/vpi/sys_lxt2.c +++ b/vpi/sys_lxt2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2013 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -392,6 +392,8 @@ static PLI_INT32 sys_dumpoff_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; dump_is_off = 1; @@ -419,6 +421,8 @@ static PLI_INT32 sys_dumpon_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (!dump_is_off) return 0; dump_is_off = 0; @@ -446,6 +450,8 @@ static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; if (dump_file == 0) return 0; if (dump_header_pending()) return 0; @@ -561,6 +567,7 @@ static PLI_INT32 sys_dumpfile_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) */ static PLI_INT32 sys_dumpflush_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ if (dump_file) vcd_work_flush(); return 0; @@ -572,6 +579,8 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) vpiHandle argv = vpi_iterate(vpiArgument, callh); s_vpi_value val; + (void)name; /* Parameter is not used. */ + /* Get the value and set the dump limit. */ assert(argv); val.format = vpiIntVal; @@ -782,6 +791,8 @@ static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_value value; unsigned depth = 0; + (void)name; /* Parameter is not used. */ + if (dump_file == 0) { open_dumpfile(callh); if (dump_file == 0) { @@ -834,6 +845,9 @@ static void* lxt2_thread(void*arg) function when the time changes. */ uint64_t cur_time = 0; int run_flag = 1; + + (void)arg; /* Parameter is not used. */ + while (run_flag) { struct vcd_work_item_s*cell = vcd_work_thread_peek(); diff --git a/vpi/sys_plusargs.c b/vpi/sys_plusargs.c index 357a2d652..f060277cd 100644 --- a/vpi/sys_plusargs.c +++ b/vpi/sys_plusargs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2011 Stephen Williams (steve@icarus.com) + * Copyright (c) 2002-2014 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 @@ -35,6 +35,8 @@ static PLI_INT32 sys_test_plusargs_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) int flag = 0; size_t slen, len; + (void)name; /* Parameter is not used. */ + vpiHandle callh = vpi_handle(vpiSysTfCall, 0); vpiHandle argv = vpi_iterate(vpiArgument, callh); diff --git a/vpi/sys_queue.c b/vpi/sys_queue.c index 7c0972b2e..55bd2b802 100644 --- a/vpi/sys_queue.c +++ b/vpi/sys_queue.c @@ -848,6 +848,8 @@ static PLI_INT32 sys_q_initialize_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; unsigned invalid_id, invalid_type, invalid_length; + (void)name; /* Parameter is not used. */ + /* Get the id. */ invalid_id = get_valid_32(vpi_scan(argv), &id); @@ -965,6 +967,8 @@ static PLI_INT32 sys_q_add_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; unsigned invalid_id; + (void)name; /* Parameter is not used. */ + /* Get the id. */ invalid_id = get_valid_32(vpi_scan(argv), &id); @@ -1086,6 +1090,8 @@ static PLI_INT32 sys_q_remove_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; unsigned invalid_id; + (void)name; /* Parameter is not used. */ + /* Get the id. */ invalid_id = get_valid_32(vpi_scan(argv), &id); @@ -1193,6 +1199,8 @@ static PLI_INT32 sys_q_full_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; unsigned invalid_id; + (void)name; /* Parameter is not used. */ + /* Get the id. */ invalid_id = get_valid_32(vpi_scan(argv), &id); @@ -1289,6 +1297,8 @@ static PLI_INT32 sys_q_exam_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; unsigned invalid_id, invalid_code; + (void)name; /* Parameter is not used. */ + /* Get the id. */ invalid_id = get_valid_32(vpi_scan(argv), &id); diff --git a/vpi/sys_random.c b/vpi/sys_random.c index bd44c7a70..14fb9cf3d 100644 --- a/vpi/sys_random.c +++ b/vpi/sys_random.c @@ -527,6 +527,8 @@ static PLI_INT32 sys_random_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) static long i_seed = 0; long a_seed; + (void)name; /* Parameter is not used. */ + /* Get the argument list and look for a seed. If it is there, get the value and reseed the random number generator. */ callh = vpi_handle(vpiSysTfCall, 0); @@ -607,6 +609,8 @@ static PLI_INT32 sys_urandom_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed; + (void)name; /* Parameter is not used. */ + /* Get the argument list and look for a seed. If it is there, get the value and reseed the random number generator. */ callh = vpi_handle(vpiSysTfCall, 0); @@ -643,6 +647,8 @@ static PLI_INT32 sys_urandom_range_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; unsigned long i_maxval, i_minval; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -681,6 +687,8 @@ static PLI_INT32 sys_dist_uniform_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_start, i_end; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -716,6 +724,8 @@ static PLI_INT32 sys_dist_normal_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_mean, i_sd; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -751,6 +761,8 @@ static PLI_INT32 sys_dist_exponential_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_mean; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -782,6 +794,8 @@ static PLI_INT32 sys_dist_poisson_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_mean; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -813,6 +827,8 @@ static PLI_INT32 sys_dist_chi_square_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_df; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -844,6 +860,8 @@ static PLI_INT32 sys_dist_t_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_df; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -875,6 +893,8 @@ static PLI_INT32 sys_dist_erlang_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) s_vpi_value val; long i_seed, i_k, i_mean; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -904,8 +924,9 @@ static PLI_INT32 sys_dist_erlang_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) return 0; } -static PLI_INT32 sys_rand_func_sizetf(PLI_BYTE8 *x) +static PLI_INT32 sys_rand_func_sizetf(PLI_BYTE8 *name) { + (void)name; /* Parameter is not used. */ return 32; } diff --git a/vpi/sys_random_mti.c b/vpi/sys_random_mti.c index 82e9e4dd1..e326075a0 100644 --- a/vpi/sys_random_mti.c +++ b/vpi/sys_random_mti.c @@ -41,6 +41,7 @@ static struct context_s global_context = {NP1, {0} }; static long mti_dist_uniform(long*seed, long start, long end) { + (void)seed; /* Parameter is not used. */ if (start >= end) return start; if ((start > LONG_MIN) || (end < LONG_MAX)) { @@ -57,6 +58,8 @@ static PLI_INT32 sys_mti_dist_uniform_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_value val; long i_seed, i_start, i_end; + (void)name; /* Parameter is not used. */ + /* Get the argument handles and convert them. */ callh = vpi_handle(vpiSysTfCall, 0); argv = vpi_iterate(vpiArgument, callh); @@ -93,6 +96,8 @@ static PLI_INT32 sys_mti_random_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) int i_seed = COOKIE; struct context_s *context; + (void)name; /* Parameter is not used. */ + /* Get the argument list and look for a seed. If it is there, get the value and reseed the random number generator. */ callh = vpi_handle(vpiSysTfCall, 0); diff --git a/vpi/sys_readmem.c b/vpi/sys_readmem.c index 15170b31a..a670a6317 100644 --- a/vpi/sys_readmem.c +++ b/vpi/sys_readmem.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2014 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 @@ -411,6 +411,8 @@ static PLI_INT32 sys_readmem_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 free_readmempath(p_cb_data cb_data) { unsigned idx; + + (void)cb_data; /* Parameter is not used. */ for(idx = 0; idx < sl_count; idx += 1) { free(search_list[idx]); } diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index c0e565aa5..2a055da5d 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2013 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2014 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 @@ -317,6 +317,8 @@ static PLI_INT32 sys_dumpoff_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; dump_is_off = 1; @@ -345,6 +347,8 @@ static PLI_INT32 sys_dumpon_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (!dump_is_off) return 0; dump_is_off = 0; @@ -373,6 +377,8 @@ static PLI_INT32 sys_dumpall_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_time now; PLI_UINT64 now64; + (void)name; /* Parameter is not used. */ + if (dump_is_off) return 0; if (dump_file == 0) return 0; if (dump_header_pending()) return 0; @@ -475,6 +481,7 @@ static PLI_INT32 sys_dumpfile_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 sys_dumpflush_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ if (dump_file) fflush(dump_file); return 0; @@ -486,6 +493,8 @@ static PLI_INT32 sys_dumplimit_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) vpiHandle argv = vpi_iterate(vpiArgument, callh); s_vpi_value val; + (void)name; /* Parameter is not used. */ + /* Get the value and set the dump limit. */ val.format = vpiIntVal; vpi_get_value(vpi_scan(argv), &val); @@ -763,6 +772,8 @@ static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) s_vpi_value value; unsigned depth = 0; + (void)name; /* Parameter is not used. */ + if (dump_file == 0) { open_dumpfile(callh); if (dump_file == 0) { diff --git a/vpi/sys_vcdoff.c b/vpi/sys_vcdoff.c index 1c487a864..97f9c71a9 100644 --- a/vpi/sys_vcdoff.c +++ b/vpi/sys_vcdoff.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2014 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 @@ -35,11 +35,13 @@ static int dump_flag = 0; static PLI_INT32 sys_dummy_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ return 0; } static PLI_INT32 sys_dumpvars_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ if (dump_flag == 0) { vpi_printf("VCD info: dumping is suppressed.\n"); dump_flag = 1; diff --git a/vpi/table_mod.c b/vpi/table_mod.c index 34d23862a..d0d587948 100644 --- a/vpi/table_mod.c +++ b/vpi/table_mod.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2013 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2011-2014 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 @@ -40,7 +40,8 @@ static unsigned table_count = 0; static PLI_INT32 cleanup_table_mod(p_cb_data cause) { unsigned idx; - (void) cause; /* Unused argument. */ + + (void)cause; /* Parameter is not used. */ for (idx = 0; idx < table_count; idx += 1) { free(tables[idx]->indep); @@ -633,6 +634,8 @@ static unsigned initialize_table_model(vpiHandle callh, const char *name, static double eval_table_model(vpiHandle callh, p_table_mod table) { unsigned idx; + + (void)callh; /* Parameter is not used. */ fprintf(stderr, "Evaluating table \"%s\" with %u variables\n", table->file.name, table->dims); for (idx = 0; idx < table->dims; idx += 1) { diff --git a/vpi/v2005_math.c b/vpi/v2005_math.c index ab8fabf2e..e9ffc360c 100644 --- a/vpi/v2005_math.c +++ b/vpi/v2005_math.c @@ -2,7 +2,7 @@ * Verilog-2005 math library for Icarus Verilog * http://www.icarus.com/eda/verilog/ * - * Copyright (C) 2007-2011 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2007-2014 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 @@ -101,6 +101,8 @@ static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) { unsigned idx; + (void)cb_data; /* Parameter is not used. */ + for (idx = 0; idx < single_funcs_count; idx += 1) { free(single_funcs[idx]); } @@ -217,7 +219,7 @@ static PLI_INT32 va_single_argument_calltf(ICARUS_VPI_CONST PLI_BYTE8 *ud) s_vpi_value val; va_single_t* fun_data; - (void) ud; /* Not used! */ + (void)ud; /* Parameter is not used. */ /* Retrieve the function and argument data. */ fun_data = vpi_get_userdata(callh); @@ -302,7 +304,7 @@ static PLI_INT32 va_double_argument_calltf(ICARUS_VPI_CONST PLI_BYTE8 *ud) double first_arg; va_double_t* fun_data; - (void) ud; /* Not used! */ + (void)ud; /* Parameter is not used. */ /* Retrieve the function and argument data. */ fun_data = vpi_get_userdata(callh); diff --git a/vpi/v2009_enum.c b/vpi/v2009_enum.c index 3c8645c4b..be9aaa9fa 100644 --- a/vpi/v2009_enum.c +++ b/vpi/v2009_enum.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Stephen Williams (steve@icarus.com) + * Copyright (c) 2010-2014 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 @@ -444,6 +444,8 @@ static PLI_INT32 ivl_enum_method_name_calltf(PLI_BYTE8*name) s_vpi_value cur_val, var_val; + (void)name; /* Parameter is not used. */ + /* Free the argument iterator. */ vpi_free_object(argv); diff --git a/vpi/v2009_string.c b/vpi/v2009_string.c index 035d6b316..bb7bed623 100644 --- a/vpi/v2009_string.c +++ b/vpi/v2009_string.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 2012-2014 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 @@ -56,6 +56,8 @@ static PLI_INT32 len_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) vpiHandle argv; vpiHandle arg; + (void)name; /* Parameter is not used. */ + argv = vpi_iterate(vpiArgument, callh); assert(argv); arg = vpi_scan(argv); diff --git a/vpi/va_math.c b/vpi/va_math.c index 8ca38e190..e9b1a0b0c 100644 --- a/vpi/va_math.c +++ b/vpi/va_math.c @@ -2,7 +2,7 @@ * Verilog-A math library for Icarus Verilog * http://www.icarus.com/eda/verilog/ * - * Copyright (C) 2007-2011 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2007-2014 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 @@ -128,6 +128,8 @@ static PLI_INT32 sys_end_of_simulation(p_cb_data cb_data) { unsigned idx; + (void)cb_data; /* Parameter is not used. */ + for (idx = 0; idx < single_funcs_count; idx += 1) { free(single_funcs[idx]); } @@ -244,7 +246,7 @@ static PLI_INT32 va_single_argument_calltf(ICARUS_VPI_CONST PLI_BYTE8 *ud) s_vpi_value val; va_single_t* fun_data; - (void) ud; /* Not used! */ + (void)ud; /* Parameter is not used. */ /* Retrieve the function and argument data. */ fun_data = vpi_get_userdata(callh); @@ -329,7 +331,7 @@ static PLI_INT32 va_double_argument_calltf(ICARUS_VPI_CONST PLI_BYTE8 *ud) double first_arg; va_double_t* fun_data; - (void) ud; /* Not used! */ + (void)ud; /* Parameter is not used. */ /* Retrieve the function and argument data. */ fun_data = vpi_get_userdata(callh); diff --git a/vpi/vams_simparam.c b/vpi/vams_simparam.c index 74fa6772d..93ec7024e 100644 --- a/vpi/vams_simparam.c +++ b/vpi/vams_simparam.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2008-2014 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 @@ -248,8 +248,7 @@ static PLI_INT32 simparam_str_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name_ext) static PLI_INT32 simparam_str_sizetf(PLI_BYTE8 *name_ext) { - (void) name_ext; /* Not used! */ - + (void) name_ext; /* Parameter is not used. */ return MAX_STRING_RESULT; /* 128 characters max! */ } diff --git a/vpi/vhdl_table.c b/vpi/vhdl_table.c index 764a18c97..657ffd76b 100644 --- a/vpi/vhdl_table.c +++ b/vpi/vhdl_table.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Stephen Williams (steve@icarus.com) + * Copyright (c) 2011-2014 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 @@ -40,7 +40,8 @@ static unsigned mdata_count = 0; static PLI_INT32 cleanup_mdata(p_cb_data cause) { unsigned idx; - (void) cause; /* Unused argument. */ + + (void) cause; /* Parameter is not used. */ for (idx= 0; idx < mdata_count; idx += 1) { free(mdata[idx]); @@ -123,7 +124,8 @@ static PLI_INT32 ivlh_attribute_event_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) vpiHandle sys = vpi_handle(vpiSysTfCall, 0); struct t_vpi_value rval; struct monitor_data*mon; - (void) name; + + (void) name; /* Parameter is not used. */ rval.format = vpiScalarVal; @@ -151,7 +153,7 @@ static PLI_INT32 ivlh_attribute_event_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) static PLI_INT32 ivlh_attribute_event_sizetf(ICARUS_VPI_CONST PLI_BYTE8*name) { - (void) name; + (void) name; /* Parameter is not used. */ return 1; } diff --git a/vpi/vpi_debug.c b/vpi/vpi_debug.c index 495648ab4..278b8dbc8 100644 --- a/vpi/vpi_debug.c +++ b/vpi/vpi_debug.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 Stephen Williams (steve@icarus.com) + * Copyright (c) 2011-2014 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 @@ -72,6 +72,7 @@ static void dump_object(vpiHandle item) static PLI_INT32 vpi_tree_compiletf(ICARUS_VPI_CONST PLI_BYTE8*name) { + (void)name; /* Parameter is not used. */ return 0; } @@ -81,6 +82,8 @@ static PLI_INT32 vpi_tree_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) vpiHandle argv = vpi_iterate(vpiArgument, callh); vpiHandle item; + (void)name; /* Parameter is not used. */ + if (argv == 0) { item = vpi_handle(vpiScope, callh); dump_object(item);