From e800751d3ebd895646ad337248e692d4146e6f7d Mon Sep 17 00:00:00 2001 From: rlar Date: Mon, 6 Feb 2012 20:03:50 +0000 Subject: [PATCH] drop some (char*) casts --- ChangeLog | 9 +++++++++ src/xspice/cm/cm.c | 2 +- src/xspice/evt/evtsetup.c | 2 +- src/xspice/evt/evttermi.c | 4 ++-- src/xspice/mif/mifconvt.c | 2 +- src/xspice/mif/mifload.c | 2 +- src/xspice/mif/mifsetup.c | 4 ++-- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2c6ef020..357cbeddd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-02-06 Robert Larice + * src/xspice/cm/cm.c , + * src/xspice/evt/evtsetup.c , + * src/xspice/evt/evttermi.c , + * src/xspice/mif/mifconvt.c , + * src/xspice/mif/mifload.c , + * src/xspice/mif/mifsetup.c : + drop some (char*) casts + 2012-02-06 Robert Larice * src/include/ngspice/inpdefs.h , * src/spicelib/parser/inplkmod.c : diff --git a/src/xspice/cm/cm.c b/src/xspice/cm/cm.c index 3e05c7b73..0de9572f8 100755 --- a/src/xspice/cm/cm.c +++ b/src/xspice/cm/cm.c @@ -663,7 +663,7 @@ int cm_message_send( here = g_mif_info.instance; /* Print the name of the instance and the message */ - printf("\nInstance: %s Message: %s\n", (char *) here->MIFname, msg); + printf("\nInstance: %s Message: %s\n", here->MIFname, msg); return(0); } diff --git a/src/xspice/evt/evtsetup.c b/src/xspice/evt/evtsetup.c index 8c7685b79..3edb34034 100755 --- a/src/xspice/evt/evtsetup.c +++ b/src/xspice/evt/evtsetup.c @@ -456,7 +456,7 @@ static int EVTsetup_jobs( /* Fill in the pointers, etc. for this new job */ i = num_jobs - 1; - jobs->job_name[i] = MIFcopy((char *) ckt->CKTcurJob->JOBname); + jobs->job_name[i] = MIFcopy(ckt->CKTcurJob->JOBname); jobs->node_data[i] = data->node; jobs->state_data[i] = data->state; jobs->msg_data[i] = data->msg; diff --git a/src/xspice/evt/evttermi.c b/src/xspice/evt/evttermi.c index 06165d765..bac2d66af 100755 --- a/src/xspice/evt/evttermi.c +++ b/src/xspice/evt/evttermi.c @@ -443,8 +443,8 @@ static void EVTport_insert( port->inst_index = inst_index; port->node_index = node_index; port->node_name = MIFcopy(node_name); - port->inst_name = MIFcopy((char *) fast->MIFname); - port->conn_name = MIFcopy((char *) fast->conn[conn_num]->name); + port->inst_name = MIFcopy(fast->MIFname); + port->conn_name = MIFcopy(fast->conn[conn_num]->name); port->port_num = port_num; /* Record the port index in the MIFinstance structure */ diff --git a/src/xspice/mif/mifconvt.c b/src/xspice/mif/mifconvt.c index da0c50f3d..cd9036377 100755 --- a/src/xspice/mif/mifconvt.c +++ b/src/xspice/mif/mifconvt.c @@ -126,7 +126,7 @@ int MIFconvTest( if (fabs(value - last_value) > tol) { if(ckt->enh->conv_debug.report_conv_probs) { ENHreport_conv_prob(ENH_ANALOG_INSTANCE, - (char *) here->MIFname, + here->MIFname, ""); } ckt->CKTnoncon++; diff --git a/src/xspice/mif/mifload.c b/src/xspice/mif/mifload.c index 7975f4051..551a31c8e 100755 --- a/src/xspice/mif/mifload.c +++ b/src/xspice/mif/mifload.c @@ -361,7 +361,7 @@ MIFload( /* report convergence problem if last call */ if(ckt->enh->conv_debug.report_conv_probs) { ENHreport_conv_prob(ENH_ANALOG_INSTANCE, - (char *) here->MIFname, ""); + here->MIFname, ""); } } } diff --git a/src/xspice/mif/mifsetup.c b/src/xspice/mif/mifsetup.c index fc320df84..b30fca94b 100755 --- a/src/xspice/mif/mifsetup.c +++ b/src/xspice/mif/mifsetup.c @@ -307,7 +307,7 @@ MIFsetup( (type == MIF_RESISTANCE || type == MIF_DIFF_RESISTANCE) ) { /* first, make the current equation */ - suffix = TMALLOC(char, strlen((char *) here->MIFname) + 100); + suffix = TMALLOC(char, strlen(here->MIFname) + 100); sprintf(suffix, "branch_%d_%d", i, j); error = CKTmkCur(ckt, &tmp, here->MIFname, suffix); FREE(suffix); @@ -330,7 +330,7 @@ MIFsetup( if(is_input && (type == MIF_CURRENT || type == MIF_DIFF_CURRENT)) { /* first, make the current equation */ - suffix = TMALLOC(char, strlen((char *) here->MIFname) + 100); + suffix = TMALLOC(char, strlen(here->MIFname) + 100); sprintf(suffix, "ibranch_%d_%d", i, j); error = CKTmkCur(ckt, &tmp, here->MIFname, suffix); FREE(suffix);