diff --git a/tgt-stub/expression.c b/tgt-stub/expression.c index e80857e31..610802a5d 100644 --- a/tgt-stub/expression.c +++ b/tgt-stub/expression.c @@ -231,7 +231,7 @@ static void show_property_expression(ivl_expr_t net, unsigned ind) { ivl_signal_t sig = ivl_expr_signal(net); const char* pnam = ivl_expr_name(net); - char*signed_flag = ivl_expr_signed(net)? "signed" : "unsigned"; + const char*signed_flag = ivl_expr_signed(net)? "signed" : "unsigned"; if (ivl_expr_value(net) == IVL_VT_REAL) { fprintf(out, "%*s\n", ind, "", diff --git a/tgt-vlog95/expr.c b/tgt-vlog95/expr.c index e8f6810ad..e31bd7450 100644 --- a/tgt-vlog95/expr.c +++ b/tgt-vlog95/expr.c @@ -401,7 +401,7 @@ static unsigned calc_can_skip_unsigned(ivl_expr_t oper1, ivl_expr_t oper2) static void emit_expr_binary(ivl_scope_t scope, ivl_expr_t expr, unsigned wid, unsigned is_full_prec) { - char *oper = ""; + const char *oper = ""; ivl_expr_t oper1 = ivl_expr_oper1(expr); ivl_expr_t oper2 = ivl_expr_oper2(expr); unsigned can_skip_unsigned = calc_can_skip_unsigned(oper1, oper2); @@ -976,7 +976,7 @@ static void emit_expr_ternary(ivl_scope_t scope, ivl_expr_t expr, unsigned wid, static void emit_expr_unary(ivl_scope_t scope, ivl_expr_t expr, unsigned wid, unsigned is_full_prec) { - char *oper = "invalid"; + const char *oper = "invalid"; ivl_expr_t oper1 = ivl_expr_oper1(expr); switch (ivl_expr_opcode(expr)) { case '-': oper = "-"; break; diff --git a/tgt-vlog95/scope.c b/tgt-vlog95/scope.c index 43640d497..91cf9797a 100644 --- a/tgt-vlog95/scope.c +++ b/tgt-vlog95/scope.c @@ -24,7 +24,7 @@ const char *func_rtn_name = 0; -static char*get_time_const(int time_value) +static const char*get_time_const(int time_value) { switch (time_value) { case 2: return "100s"; diff --git a/tgt-vlog95/stmt.c b/tgt-vlog95/stmt.c index 530c9e471..d5c2c037d 100644 --- a/tgt-vlog95/stmt.c +++ b/tgt-vlog95/stmt.c @@ -408,7 +408,8 @@ static void emit_assign_and_opt_opcode(ivl_scope_t scope, ivl_statement_t stmt, unsigned allow_opcode) { unsigned wid; - char opcode, *opcode_str; + char opcode; + const char *opcode_str; assert (ivl_statement_type(stmt) == IVL_ST_ASSIGN); // HERE: Do we need to calculate the width? The compiler should have already @@ -941,7 +942,7 @@ static void emit_stmt_block_named(ivl_scope_t scope, ivl_statement_t stmt) static void emit_stmt_case(ivl_scope_t scope, ivl_statement_t stmt) { - char *case_type; + const char *case_type; unsigned idx, default_case, count = ivl_stmt_case_count(stmt); switch (ivl_statement_type(stmt)) { case IVL_ST_CASE: diff --git a/tgt-vvp/draw_class.c b/tgt-vvp/draw_class.c index c0e538831..4fcafd894 100644 --- a/tgt-vvp/draw_class.c +++ b/tgt-vvp/draw_class.c @@ -30,7 +30,7 @@ static void show_prop_type_vector(ivl_type_t ptype) unsigned packed_dimensions = ivl_type_packed_dimensions(ptype); assert(packed_dimensions < 2); - char*signed_flag = ivl_type_signed(ptype)? "s" : ""; + const char*signed_flag = ivl_type_signed(ptype)? "s" : ""; char code = data_type==IVL_VT_BOOL? 'b' : 'L'; if (packed_dimensions == 0) { diff --git a/tgt-vvp/draw_net_input.c b/tgt-vvp/draw_net_input.c index 3ee73d36b..67a4a7849 100644 --- a/tgt-vvp/draw_net_input.c +++ b/tgt-vvp/draw_net_input.c @@ -230,7 +230,7 @@ static void str_repeat(char*buf, const char*str, unsigned rpt) * If the drive strength is strong we can draw a C4<> constant as the * pull value, otherwise we need to draw a C8<> constant. */ -static char* draw_net_pull(ivl_net_logic_t lptr, ivl_drive_t drive, char*level) +static char* draw_net_pull(ivl_net_logic_t lptr, ivl_drive_t drive, const char*level) { char*result; char tmp[32]; diff --git a/tgt-vvp/vvp_scope.c b/tgt-vvp/vvp_scope.c index 7a8632367..99c6fe73f 100644 --- a/tgt-vvp/vvp_scope.c +++ b/tgt-vvp/vvp_scope.c @@ -1804,7 +1804,7 @@ static int sfunc_has_modpath_output(ivl_lpm_t lptr) static void draw_sfunc_output_def(ivl_lpm_t net, char type) { ivl_nexus_t nex = ivl_lpm_q(net); - char *suf = (type == 'd') ? "/d" : ""; + const char *suf = (type == 'd') ? "/d" : ""; switch (data_type_of_nexus(nex)) { case IVL_VT_REAL: diff --git a/vpi/sys_countdrivers.c b/vpi/sys_countdrivers.c index 304672ec8..417d20b5a 100644 --- a/vpi/sys_countdrivers.c +++ b/vpi/sys_countdrivers.c @@ -102,7 +102,7 @@ static PLI_INT32 sys_countdrivers_compiletf(ICARUS_VPI_CONST PLI_BYTE8 *name) /* The optional arguments must be variables. */ for (arg_num = 2; arg_num < 7; arg_num += 1) { - char *arg_name = NULL; + const char *arg_name = NULL; switch (arg_num) { case 2: arg_name = "second"; break; case 3: arg_name = "third"; break; diff --git a/vpi/sys_queue.c b/vpi/sys_queue.c index 4f1dc0e25..7f2d19f6d 100644 --- a/vpi/sys_queue.c +++ b/vpi/sys_queue.c @@ -587,7 +587,7 @@ static unsigned check_numeric_args(vpiHandle argv, unsigned count, /* Check that the first count arguments are numeric. Currently * only three are needed/supported. */ for (idx = 0; idx < count; idx += 1) { - char *loc = NULL; + const char *loc = NULL; vpiHandle arg = vpi_scan(argv); /* Get the name for this argument. */