Browse Source

copy_coeffs(), swallow type conversion warnings

rlar 15 years ago
parent
commit
416885e4b5
  1. 6
      ChangeLog
  2. 6
      src/spicelib/devices/cpl/cplmpar.c
  3. 8
      src/spicelib/devices/isrc/isrcpar.c
  4. 8
      src/spicelib/devices/vsrc/vsrcpar.c

6
ChangeLog

@ -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 ,

6
src/spicelib/devices/cpl/cplmpar.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));
}

8
src/spicelib/devices/isrc/isrcpar.c

@ -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));
}

8
src/spicelib/devices/vsrc/vsrcpar.c

@ -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…
Cancel
Save