diff --git a/ChangeLog b/ChangeLog index 214ff1613..7eaa85e87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-06-11 Holger Vogt + * onemesh.c misc.c com_compose.c com_fft.c evaluate.c + hpgl.c linear.c misccoms.c options.c points.c rawfile.c + spec.c spiceif.c variable.c complete.c clip.c graf.c + plot5.c plotit.c spbuild.c dctrcurv.c distoan.c + noisean.c nbjttemp.c urcsetup.c ipc.c ipcstdio.c mifgetvalue.c: + remove compiler warnings by explicit casting double -> int etc. + ============================ ngspice-23 ================================== 2011-06-04 Holger Vogt * tests/bin/ngspice.pm: version 23 diff --git a/src/ciderlib/oned/onemesh.c b/src/ciderlib/oned/onemesh.c index f4a03f1a2..5e5311020 100644 --- a/src/ciderlib/oned/onemesh.c +++ b/src/ciderlib/oned/onemesh.c @@ -240,7 +240,7 @@ adjustBaseContact(ONEdevice *pDevice, int indexEB, int indexBC) /* Initialize the base contact to be the center of the two junctions */ /* This should take care of uniform dopings. */ - midPoint = 0.5 * (indexEB + indexBC); + midPoint = (int)(0.5 * (indexEB + indexBC)); newBaseIndex = midPoint; if (pBaseNode->baseType == P_TYPE) { diff --git a/src/ciderlib/support/misc.c b/src/ciderlib/support/misc.c index fc9efb3e7..90ff54fb3 100644 --- a/src/ciderlib/support/misc.c +++ b/src/ciderlib/support/misc.c @@ -24,22 +24,23 @@ double guessNewConc(double conc, double delta) lambda = 1.0; fibn = 1.0; fibp = 1.0; + newConc = 0.0; for ( ; !acceptable ; ) { - fib = fibp; - fibp = fibn; - fibn += fib; - lambda *= fibp / fibn; - newConc = conc + delta * lambda; - if( newConc > 0.0 ) { - acceptable = TRUE; - } - else { - /* newConc is still negative but fibp and fibn are large */ - if ( (fibp > 1e6) || (fibn > 1e6) ) { - acceptable = TRUE; - newConc = conc; - } - } + fib = fibp; + fibp = fibn; + fibn += fib; + lambda *= fibp / fibn; + newConc = conc + delta * lambda; + if( newConc > 0.0 ) { + acceptable = TRUE; + } + else { + /* newConc is still negative but fibp and fibn are large */ + if ( (fibp > 1e6) || (fibn > 1e6) ) { + acceptable = TRUE; + newConc = conc; + } + } } return( newConc ); } @@ -64,7 +65,7 @@ double lookup(double **dataTable, double x) int index, numPoints; BOOLEAN done = FALSE; - numPoints = dataTable[ 0 ][ 0 ]; + numPoints = (int)dataTable[ 0 ][ 0 ]; for( index = 2; index <= numPoints && (!done); index++ ) { x1 = dataTable[ 0 ][ index ]; /* check if x1 > x */ diff --git a/src/frontend/com_compose.c b/src/frontend/com_compose.c index 0859de10f..35a9fe9a3 100644 --- a/src/frontend/com_compose.c +++ b/src/frontend/com_compose.c @@ -338,7 +338,7 @@ com_compose(wordlist *wl) var, val); return; } - log = *td; + log = (int)(*td); } else if (cieq(var, "dec")) { decgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { @@ -347,7 +347,7 @@ com_compose(wordlist *wl) var, val); return; } - dec = *td; + dec = (int)(*td); } else if (cieq(var, "gauss")) { gaussgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { @@ -356,7 +356,7 @@ com_compose(wordlist *wl) var, val); return; } - gauss = *td; + gauss = (int)(*td); } else if (cieq(var, "random")) { randmgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { @@ -365,7 +365,7 @@ com_compose(wordlist *wl) var, val); return; } - randm = *td; + randm = (int)(*td); } else if (cieq(var, "pool")) { poolgiven = TRUE; pool = val; @@ -453,7 +453,7 @@ com_compose(wordlist *wl) for (i = 0, tt = start; i < lin; i++, tt += step) data[i] = tt; - length = lin; + length = (int)lin; } else if (loggiven || decgiven) { /* Create a log sweep... */ } else if (randmgiven) { diff --git a/src/frontend/com_fft.c b/src/frontend/com_fft.c index b34475924..c108d68aa 100644 --- a/src/frontend/com_fft.c +++ b/src/frontend/com_fft.c @@ -260,7 +260,7 @@ com_psd(wordlist *wl) int ngood, mm; unsigned long fpts, i, j, tlen, jj, smooth, hsmooth; char *s; - struct dvec *f, *vlist, *lv, *vec; + struct dvec *f, *vlist, *lv = NULL, *vec; struct pnode *names, *first_name; float *reald, *imagd; @@ -480,7 +480,7 @@ com_psd(wordlist *wl) for (i = 0; iv_numdims - 1; - down = up = ind->v_realdata[0]; + down = up = (int)(ind->v_realdata[0]); } else { newdim = v->v_numdims; - down = realpart(&ind->v_compdata[0]); - up = imagpart(&ind->v_compdata[0]); + down = (int)(realpart(&ind->v_compdata[0])); + up = (int)(imagpart(&ind->v_compdata[0])); } if (up < down) { i = up; diff --git a/src/frontend/hpgl.c b/src/frontend/hpgl.c index c6c4b87e3..ec72927f9 100644 --- a/src/frontend/hpgl.c +++ b/src/frontend/hpgl.c @@ -98,13 +98,13 @@ int GL_Init(void) dispdev->numlinestyles = NUMELEMS(linestyle); dispdev->numcolors = 6; - dispdev->width = DELXMAX * scale; - dispdev->height = DELYMAX * scale; + dispdev->width = (int)(DELXMAX * scale); + dispdev->height = (int)(DELYMAX * scale); screenflag = 0; - dispdev->minx = XOFF * 1.0; - dispdev->miny = YOFF * 1.0; + dispdev->minx = (int)(XOFF * 1.0); + dispdev->miny = (int)(YOFF * 1.0); return(0); @@ -134,8 +134,8 @@ GRAPH *graph) } /* reasonable values, used in gr_ for placement */ - graph->fontwidth = fontwidth * scale; /* was 12, p.w.h. */ - graph->fontheight = fontheight * scale; /* was 24, p.w.h. */ + graph->fontwidth = (int)(fontwidth * scale); /* was 12, p.w.h. */ + graph->fontheight = (int)(fontheight * scale); /* was 24, p.w.h. */ graph->absolute.width = dispdev->width; graph->absolute.height = dispdev->height; @@ -229,10 +229,10 @@ double theta, double delta_theta) { int x1, y1, angle; - x1 = x0 + r * cos(theta); - y1 = y0 + r * sin(theta); + x1 = x0 + (int)(r * cos(theta)); + y1 = y0 + (int)(r * sin(theta)); - angle = RAD_TO_DEG * delta_theta; + angle = (int)(RAD_TO_DEG * delta_theta); fprintf(plotfile, "PU;PA %d , %d;", jgmult*(x1+xoff+XTADJ), jgmult*(y1+yoff+YTADJ)); fprintf(plotfile, "PD;AA %d , %d, %d;", jgmult*(x0+xoff+XTADJ), jgmult*(y0+yoff+YTADJ), angle); diff --git a/src/frontend/linear.c b/src/frontend/linear.c index 18d527f96..d0cac721d 100644 --- a/src/frontend/linear.c +++ b/src/frontend/linear.c @@ -64,7 +64,7 @@ com_linearize(wordlist *wl) plot_new(new); plot_setcur(new->pl_typename); plot_list = new; - len = (tstop - tstart) / tstep + 1.5; + len = (int)((tstop - tstart) / tstep + 1.5); newtime = alloc(struct dvec); newtime->v_name = copy(oldtime->v_name); newtime->v_type = oldtime->v_type; diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index e7a397464..d1a52a885 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -142,6 +142,8 @@ com_bug(wordlist *wl) void com_bug(wordlist *wl) { + NG_IGNORE(wl); + fprintf(cp_out, "Send mail to the address ngspice-devel@lists.sourceforge.net\n"); return; } diff --git a/src/frontend/options.c b/src/frontend/options.c index 04f3f5df3..21a31a977 100644 --- a/src/frontend/options.c +++ b/src/frontend/options.c @@ -296,7 +296,7 @@ cp_usrset(struct variable *var, bool isset) if ((var->va_type == CP_BOOL) && (isset == FALSE)) raw_prec = -1; else if (var->va_type == CP_REAL) - raw_prec = var->va_real; + raw_prec = (int)(var->va_real); else if (var->va_type == CP_NUM) raw_prec = var->va_num; else @@ -305,7 +305,7 @@ cp_usrset(struct variable *var, bool isset) if ((var->va_type == CP_BOOL) && (isset == FALSE)) cp_numdgt = -1; else if (var->va_type == CP_REAL) - cp_numdgt = var->va_real; + cp_numdgt = (int)(var->va_real); else if (var->va_type == CP_NUM) cp_numdgt = var->va_num; else diff --git a/src/frontend/parser/complete.c b/src/frontend/parser/complete.c index e0ee4bcae..e612f92ce 100644 --- a/src/frontend/parser/complete.c +++ b/src/frontend/parser/complete.c @@ -462,6 +462,8 @@ cp_ccon(bool on) # endif #endif +#else + NG_IGNORE(on); #endif return; diff --git a/src/frontend/plotting/clip.c b/src/frontend/plotting/clip.c index e92014560..05c823733 100644 --- a/src/frontend/plotting/clip.c +++ b/src/frontend/plotting/clip.c @@ -186,8 +186,8 @@ clip_to_circle(int *x1, int *y1, int *x2, int *y2, int cx, int cy, int rad) if (gamma < M_PI / 2) gamma = M_PI - gamma; beta = M_PI - alpha - gamma; - *x1 = cx + rad * cos(theta1 + beta); - *y1 = cy + rad * sin(theta1 + beta); + *x1 = (int)(cx + rad * cos(theta1 + beta)); + *y1 = (int)(cy + rad * sin(theta1 + beta)); } if (b > rad) { tt = (c * c + b * b - a * a) / (2 * b * c); @@ -200,8 +200,8 @@ clip_to_circle(int *x1, int *y1, int *x2, int *y2, int cx, int cy, int rad) if (gamma < M_PI / 2) gamma = M_PI - gamma; beta = M_PI - alpha - gamma; - *x2 = cx + rad * cos(theta2 - beta); - *y2 = cy + rad * sin(theta2 - beta); + *x2 = (int)(cx + rad * cos(theta2 - beta)); + *y2 = (int)(cy + rad * sin(theta2 - beta)); } if (flip) { i = *x1; diff --git a/src/frontend/plotting/graf.c b/src/frontend/plotting/graf.c index ee95c2cf3..dc4e5b18e 100644 --- a/src/frontend/plotting/graf.c +++ b/src/frontend/plotting/graf.c @@ -493,8 +493,8 @@ gr_resize(GRAPH *graph) scalex = oldxratio / graph->aspectratiox; scaley = oldyratio / graph->aspectratioy; for (k = graph->keyed; k; k = k->next) { - k->x = (k->x - graph->viewportxoff) * scalex + graph->viewportxoff; - k->y = (k->y - graph->viewportyoff) * scaley + graph->viewportyoff; + k->x = (int)((k->x - graph->viewportxoff) * scalex + graph->viewportxoff); + k->y = (int)((k->y - graph->viewportyoff) * scaley + graph->viewportyoff); } /* X also generates an expose after a resize. @@ -519,8 +519,8 @@ gr_resize_internal(GRAPH *graph) { if (!graph->grid.xsized) - graph->viewport.width = graph->absolute.width - - 1.4 * graph->viewportxoff; + graph->viewport.width = (int)(graph->absolute.width - + 1.4 * graph->viewportxoff); if (!graph->grid.ysized) graph->viewport.height = graph->absolute.height - 2 * graph->viewportyoff; diff --git a/src/frontend/plotting/plot5.c b/src/frontend/plotting/plot5.c index 9a0e91dcc..1a43b36bb 100644 --- a/src/frontend/plotting/plot5.c +++ b/src/frontend/plotting/plot5.c @@ -141,10 +141,10 @@ Plt5_Arc(int xc, int yc, int radius, double theta, double delta_theta) if(delta_phi > delta_theta) delta_phi = delta_theta; - x0 = xc + (radius * cos(theta)); - y0 = yc + (radius * sin(theta)); - x1 = xc + (radius * cos(theta + delta_phi)); - y1 = yc + (radius * sin(theta + delta_phi)); + x0 = xc + (int)(radius * cos(theta)); + y0 = yc + (int)(radius * sin(theta)); + x1 = xc + (int)(radius * cos(theta + delta_phi)); + y1 = yc + (int)(radius * sin(theta + delta_phi)); putc('a', plotfile); putsi(xc); diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index bc00fd8bc..c6286091c 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -934,7 +934,7 @@ plotit(wordlist *wl, char *hcopy, char *devname) !isreal(plot_cur->pl_scale) || !ciprefix("tran", plot_cur->pl_typename))) { - newlen = (tstop - tstart) / tstep + 1.5; + newlen = (int)((tstop - tstart) / tstep + 1.5); newscale = TMALLOC(double, newlen); diff --git a/src/frontend/points.c b/src/frontend/points.c index 3e7f5f199..e5a9a0bb6 100644 --- a/src/frontend/points.c +++ b/src/frontend/points.c @@ -60,10 +60,10 @@ ft_findpoint(double pt, double *lims, int maxp, int minp, bool islog) if (islog) { tl = mylog10(lims[0]); th = mylog10(lims[1]); - return (((mylog10(pt) - tl) / (th - tl)) * + return (int)(((mylog10(pt) - tl) / (th - tl)) * (maxp - minp) + minp); } else { - return (((pt - lims[0]) / (lims[1] - lims[0])) * + return (int)(((pt - lims[0]) / (lims[1] - lims[0])) * (maxp - minp) + minp); } } diff --git a/src/frontend/rawfile.c b/src/frontend/rawfile.c index 7e745d48a..0657e48ce 100644 --- a/src/frontend/rawfile.c +++ b/src/frontend/rawfile.c @@ -484,7 +484,7 @@ raw_read(char *name) curpl->pl_dvecs = v; if (!curpl->pl_scale) curpl->pl_scale = v; - v->v_flags = flags; + v->v_flags = (short)flags; v->v_plot = curpl; v->v_length = npoints; v->v_numdims = 0; diff --git a/src/frontend/spec.c b/src/frontend/spec.c index 0bbac05c1..18665e627 100644 --- a/src/frontend/spec.c +++ b/src/frontend/spec.c @@ -74,7 +74,7 @@ com_spec(wordlist *wl) span = ((int)(span*stepf*1.000000000001))/stepf; if (span > 0) { startf = (int)(startf/stepf*1.000000000001) * stepf; - fpts = (stopf - startf)/stepf + 1; + fpts = (int)((stopf - startf)/stepf + 1.); if (stopf > startf + (fpts-1)*stepf) fpts++; } else { fprintf(cp_err,"Error: time span limits step freq to %1.1e Hz\n", diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index e5c6f3694..a360cb4a6 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -458,7 +458,7 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value) if (type == CP_NUM) pval.iValue = *((int *) value); else if (type == CP_REAL) - pval.iValue = *((double *) value); + pval.iValue = (int)(*((double *) value)); else goto badtype; break; @@ -1111,7 +1111,7 @@ doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op iptr = nval.v.vec.iVec = NEWN(int, n); for (i = 0; i < n; i++) - *iptr++ = *dptr++; + *iptr++ = (int)(*dptr++); break; case IF_REAL: @@ -1128,7 +1128,7 @@ doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op switch (opt->dataType & IF_VARTYPES) { case IF_FLAG: case IF_INTEGER: - nval.iValue = *val->v_realdata; + nval.iValue = (int)(*val->v_realdata); break; case IF_REAL: diff --git a/src/frontend/variable.c b/src/frontend/variable.c index 31516a333..f76305c20 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -159,7 +159,7 @@ cp_vset(char *varname, enum cp_types type, void *value) else if (eq(copyvarname, "history") && (type == CP_NUM)) cp_maxhistlength = v->va_num; else if (eq(copyvarname, "history") && (type == CP_REAL)) - cp_maxhistlength = v->va_real; + cp_maxhistlength = (int)(v->va_real); else if (eq(copyvarname, "noclobber")) cp_noclobber = TRUE; else if (eq(varname, "echo")) /*CDHW*/ diff --git a/src/maths/sparse/spbuild.c b/src/maths/sparse/spbuild.c index f6032bb89..21d3cf785 100644 --- a/src/maths/sparse/spbuild.c +++ b/src/maths/sparse/spbuild.c @@ -969,7 +969,7 @@ EnlargeMatrix(MatrixPtr Matrix, int NewSize) return; /* Expand the matrix frame. */ - NewSize = MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); + NewSize = (int)MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); Matrix->AllocatedSize = NewSize; if (( SP_REALLOC(Matrix->IntToExtColMap, int, NewSize+1)) == NULL) @@ -1059,7 +1059,7 @@ ExpandTranslationArrays(MatrixPtr Matrix, int NewSize) return; /* Expand the translation arrays ExtToIntRowMap and ExtToIntColMap. */ - NewSize = MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); + NewSize = (int)MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); Matrix->AllocatedExtSize = NewSize; if (( SP_REALLOC(Matrix->ExtToIntRowMap, int, NewSize+1)) == NULL) diff --git a/src/spicelib/analysis/dctrcurv.c b/src/spicelib/analysis/dctrcurv.c index 7d8388ea7..48e46eac3 100644 --- a/src/spicelib/analysis/dctrcurv.c +++ b/src/spicelib/analysis/dctrcurv.c @@ -516,7 +516,7 @@ nextstep:; #ifdef HAS_WINDOWS if (i == cv->TRCVnestLevel) { actval += cv->TRCVvStep[cv->TRCVnestLevel]; - SetAnalyse( "dc", (int)abs(((actval * 1000.) / actdiff))); + SetAnalyse( "dc", abs((int)(actval * 1000. / actdiff))); } #endif } diff --git a/src/spicelib/analysis/distoan.c b/src/spicelib/analysis/distoan.c index afaba3a64..e18804cc7 100644 --- a/src/spicelib/analysis/distoan.c +++ b/src/spicelib/analysis/distoan.c @@ -71,14 +71,14 @@ time1 = SPfrontEnd->IFseconds(); exp(log(10.0)/job->DnumSteps); freqTol = job->DfreqDelta * job->DstopF1 * ckt->CKTreltol; - NoOfPoints = 1 + floor ((job->DnumSteps) / log(10.0) * log((job->DstopF1+freqTol)/(job->DstartF1))); + NoOfPoints = 1 + (int)floor ((job->DnumSteps) / log(10.0) * log((job->DstopF1+freqTol)/(job->DstartF1))); break; case OCTAVE: job->DfreqDelta = exp(log(2.0)/job->DnumSteps); freqTol = job->DfreqDelta * job->DstopF1 * ckt->CKTreltol; - NoOfPoints = 1 + floor ((job->DnumSteps) / log(2.0) * log((job->DstopF1+freqTol)/(job->DstartF1))); + NoOfPoints = 1 + (int)floor ((job->DnumSteps) / log(2.0) * log((job->DstopF1+freqTol)/(job->DstartF1))); break; case LINEAR: job->DfreqDelta = @@ -86,7 +86,7 @@ time1 = SPfrontEnd->IFseconds(); job->DstartF1)/ (job->DnumSteps+1); freqTol = job->DfreqDelta * ckt->CKTreltol; - NoOfPoints = job->DnumSteps+1+ floor(freqTol/(job->DfreqDelta)); + NoOfPoints = job->DnumSteps+1+ (int)floor(freqTol/(job->DfreqDelta)); break; default: return(E_BADPARM); diff --git a/src/spicelib/analysis/noisean.c b/src/spicelib/analysis/noisean.c index 05e0c6213..82583fa74 100644 --- a/src/spicelib/analysis/noisean.c +++ b/src/spicelib/analysis/noisean.c @@ -144,7 +144,7 @@ NOISEan (CKTcircuit *ckt, int restart) } } else { /* we must have paused before. pick up where we left off */ - step = job->NsavFstp; + step = (int)(job->NsavFstp); switch (job->NstpType) { case DECADE: diff --git a/src/spicelib/devices/nbjt/nbjttemp.c b/src/spicelib/devices/nbjt/nbjttemp.c index 5b8f2d5d1..7aa96bd6d 100644 --- a/src/spicelib/devices/nbjt/nbjttemp.c +++ b/src/spicelib/devices/nbjt/nbjttemp.c @@ -117,7 +117,7 @@ NBJTtemp(GENmodel *inModel, CKTcircuit *ckt) printf("Warning: base contact not on node -- adjusting contact\n"); } NBJTjunctions(pDevice, &indexBE, &indexBC); - pDevice->baseIndex = 0.5 * (indexBE + indexBC); + pDevice->baseIndex = (int)(0.5 * (indexBE + indexBC)); } if (inst->NBJTtype == PNP) { pDevice->elemArray[pDevice->baseIndex]->pNodes[0]->baseType = N_TYPE; diff --git a/src/spicelib/devices/urc/urcsetup.c b/src/spicelib/devices/urc/urcsetup.c index b195715f6..29bbe5a73 100644 --- a/src/spicelib/devices/urc/urcsetup.c +++ b/src/spicelib/devices/urc/urcsetup.c @@ -83,7 +83,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) i0 = here->URClength * model->URCisPerL; if(!here->URClumpsGiven) { wnorm = model->URCfmax * r0 * c0 * 2.0 * M_PI; - here->URClumps=MAX(3.0,log(wnorm*(((p-1)/p)*((p-1)/p)))/log(p)); + here->URClumps=(int)MAX(3.0,log(wnorm*(((p-1)/p)*((p-1)/p)))/log(p)); if(wnorm <35) here->URClumps=3; /* may want to limit lumps to <= 100 or something like that */ } diff --git a/src/xspice/ipc/ipc.c b/src/xspice/ipc/ipc.c index 33fc40733..4c712580b 100755 --- a/src/xspice/ipc/ipc.c +++ b/src/xspice/ipc/ipc.c @@ -809,9 +809,9 @@ stuff_binary_v1 ( assert (sizeof(char) == 1); assert ((n >= 1) && (n <= 2)); - trick.float_val[0] = d1; + trick.float_val[0] = (float)d1; if (n > 1) { - trick.float_val[1] = d2; + trick.float_val[1] = (float)d2; } for (i = 0, j = pos; i < n*sizeof(float); j++, i++) buf[j] = trick.ch[i]; @@ -936,7 +936,7 @@ ipc_send_event ( /* Put the analysis step bytes in */ buff_len = (int) strlen(buff); buff_ptr = buff + buff_len; - fvalue = step; + fvalue = (float)step; temp_ptr = (char *) &fvalue; for(i = 0; i < 4; i++) { *buff_ptr = temp_ptr[i]; @@ -945,7 +945,7 @@ ipc_send_event ( } /* Put the plot value in */ - fvalue = plot_val; + fvalue = (float)plot_val; temp_ptr = (char *) &fvalue; for(i = 0; i < 4; i++) { *buff_ptr = temp_ptr[i]; diff --git a/src/xspice/ipc/ipcstdio.c b/src/xspice/ipc/ipcstdio.c index 8b7241900..6a67f31c2 100755 --- a/src/xspice/ipc/ipcstdio.c +++ b/src/xspice/ipc/ipcstdio.c @@ -27,6 +27,10 @@ Ipc_Status_t ipc_transport_initialize_server ( Ipc_Protocol_t p, char *batch_filename ) { + NG_IGNORE(server_name); + NG_IGNORE(p); + NG_IGNORE(batch_filename); + assert (m == IPC_MODE_INTERACTIVE); printf ("INITIALIZE_SERVER\n"); return IPC_STATUS_OK; @@ -38,6 +42,8 @@ Ipc_Status_t ipc_transport_get_line ( int *len, Ipc_Wait_t wait ) { + NG_IGNORE(wait); + printf ("GET_LINE\n"); gets (str); *len = strlen (str); diff --git a/src/xspice/mif/mifgetvalue.c b/src/xspice/mif/mifgetvalue.c index 4d629d839..812111c57 100755 --- a/src/xspice/mif/mifgetvalue.c +++ b/src/xspice/mif/mifgetvalue.c @@ -268,9 +268,9 @@ static int MIFget_integer(char *token, char **err) l = 0; } else if(dtemp > 0.0) - l = dtemp + 0.5; + l = (long)(dtemp + 0.5); else - l = dtemp - 0.5; + l = (long)(dtemp - 0.5); } return((int) l);