diff --git a/ChangeLog b/ChangeLog index 482c029c2..f9e06dd6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-06 Robert Larice + * src/frontend/outitf.c , + * src/frontend/plotting/grid.c , + * src/misc/string.c , + * src/spicelib/devices/cktcrte.c : + add some `int' and `size_t' casts + 2010-11-06 Robert Larice * src/frontend/measure.c , * src/frontend/outitf.c , diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 8f0a5fa54..51b73204e 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -820,9 +820,10 @@ fileInit_pass2(runDesc *run) /* Allocate Row buffer */ if (run->binary) { - rowbuflen=(run->numData)*sizeof(double); - if (run->isComplex) rowbuflen *=2; - rowbuf=(double *)tmalloc(rowbuflen); + rowbuflen = (size_t) (run->numData) * sizeof(double); + if (run->isComplex) + rowbuflen *= 2; + rowbuf = (double *) tmalloc(rowbuflen); } else rowbuf=NULL; return; diff --git a/src/frontend/plotting/grid.c b/src/frontend/plotting/grid.c index d49b060a9..1c27d153c 100644 --- a/src/frontend/plotting/grid.c +++ b/src/frontend/plotting/grid.c @@ -324,7 +324,7 @@ lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis) if (i < 0) i = 6; /* No scale units */ - else if (i >= sizeof(scaleletters) - 1) { + else if (i >= (int) sizeof(scaleletters) - 1) { /* sizeof includes '\0' at end, which is useless */ /* i = sizeof(scaleletters) - 2; */ i = 6; /* No scale units */ diff --git a/src/misc/string.c b/src/misc/string.c index da33d2519..06d674503 100644 --- a/src/misc/string.c +++ b/src/misc/string.c @@ -36,7 +36,7 @@ copy(const char *str) char * copy_substring(const char *str, const char *end) { - int n = end - str; + size_t n = (size_t) (end - str); char *p; if ((p = TMALLOC(char, n + 1))) { diff --git a/src/spicelib/devices/cktcrte.c b/src/spicelib/devices/cktcrte.c index f67f5896c..05ca999ac 100644 --- a/src/spicelib/devices/cktcrte.c +++ b/src/spicelib/devices/cktcrte.c @@ -46,7 +46,7 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid na printf("In CKTcrtElt, about to tmalloc new model, type = %d. . . \n", type); #endif - instPtr = (GENinstance *) tmalloc(*DEVices[type]->DEVinstSize); + instPtr = (GENinstance *) tmalloc((size_t) *DEVices[type]->DEVinstSize); if (instPtr == (GENinstance *)NULL) return E_NOMEM;