add some `int' and `size_t' casts
This commit is contained in:
parent
d0dba768f8
commit
1779d62558
|
|
@ -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 ,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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))) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue