copy_coeffs(), swallow type conversion warnings
This commit is contained in:
parent
90360ef24c
commit
416885e4b5
|
|
@ -1,3 +1,9 @@
|
|||
2011-06-30 Robert Larice
|
||||
* src/spicelib/devices/cpl/cplmpar.c ,
|
||||
* src/spicelib/devices/isrc/isrcpar.c ,
|
||||
* src/spicelib/devices/vsrc/vsrcpar.c :
|
||||
copy_coeffs(), swallow type conversion warnings
|
||||
|
||||
2011-06-26 Robert Larice
|
||||
* src/include/hash.h ,
|
||||
* src/misc/dstring.c ,
|
||||
|
|
|
|||
|
|
@ -15,12 +15,14 @@ Author: 1992 Charles Hough
|
|||
|
||||
static void copy_coeffs(double **dst, IFvalue *value)
|
||||
{
|
||||
int n = value->v.numValue;
|
||||
|
||||
if(*dst)
|
||||
tfree(*dst);
|
||||
|
||||
*dst = TMALLOC(double, value->v.numValue);
|
||||
*dst = TMALLOC(double, n);
|
||||
|
||||
memcpy(*dst, value->v.vec.rVec, value->v.numValue * sizeof(double));
|
||||
memcpy(*dst, value->v.vec.rVec, (size_t) n * sizeof(double));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,14 +16,16 @@ Modified: 2000 AlansFixes
|
|||
|
||||
static void copy_coeffs(ISRCinstance *here, IFvalue *value)
|
||||
{
|
||||
int n = value->v.numValue;
|
||||
|
||||
if(here->ISRCcoeffs)
|
||||
tfree(here->ISRCcoeffs);
|
||||
|
||||
here->ISRCcoeffs = TMALLOC(double, value->v.numValue);
|
||||
here->ISRCfunctionOrder = value->v.numValue;
|
||||
here->ISRCcoeffs = TMALLOC(double, n);
|
||||
here->ISRCfunctionOrder = n;
|
||||
here->ISRCcoeffsGiven = TRUE;
|
||||
|
||||
memcpy(here->ISRCcoeffs, value->v.vec.rVec, value->v.numValue * sizeof(double));
|
||||
memcpy(here->ISRCcoeffs, value->v.vec.rVec, (size_t) n * sizeof(double));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,14 +16,16 @@ Modified: 2000 AlansFixes
|
|||
|
||||
static void copy_coeffs(VSRCinstance *here, IFvalue *value)
|
||||
{
|
||||
int n = value->v.numValue;
|
||||
|
||||
if(here->VSRCcoeffs)
|
||||
tfree(here->VSRCcoeffs);
|
||||
|
||||
here->VSRCcoeffs = TMALLOC(double, value->v.numValue);
|
||||
here->VSRCfunctionOrder = value->v.numValue;
|
||||
here->VSRCcoeffs = TMALLOC(double, n);
|
||||
here->VSRCfunctionOrder = n;
|
||||
here->VSRCcoeffsGiven = TRUE;
|
||||
|
||||
memcpy(here->VSRCcoeffs, value->v.vec.rVec, value->v.numValue * sizeof(double));
|
||||
memcpy(here->VSRCcoeffs, value->v.vec.rVec, (size_t) n * sizeof(double));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue