Changeset 4925


Ignore:
Timestamp:
07/18/12 10:41:43 (6 years ago)
Author:
paulf
Message:

cleaned up calloc() warnings with size_t casts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libsrc/util/fft_prep.c

    r484 r4925  
    7373  if (last_nfft == 1) 
    7474  { 
    75     if ( (fft_list = (FACT *)calloc(1, sizeof(FACT))) == (FACT *)NULL) 
     75    if ( (fft_list = (FACT *)calloc((size_t) 1, sizeof(FACT))) == (FACT *)NULL) 
    7676      return -1; 
    7777    this = fft_list; 
     
    8282    { 
    8383      /* Get the next factor structure and fill it in */ 
    84       if ( (next->next = (FACT *)calloc(1, sizeof(FACT))) == (FACT *)NULL) 
     84      if ( (next->next = (FACT *)calloc((size_t) 1, sizeof(FACT))) == (FACT *)NULL) 
    8585        return -1; 
    8686      next = next->next; 
     
    135135      } 
    136136      /* Get the next factor structure and fill it in */ 
    137       if ( ( next = (FACT *)calloc(1, sizeof(FACT))) == (FACT *)NULL) 
     137      if ( ( next = (FACT *)calloc((size_t) 1, sizeof(FACT))) == (FACT *)NULL) 
    138138        return -1; 
    139139      next->nfft = next_nfft; 
     
    240240   
    241241  ntrigs = 3 * this->nfft / 2 + 1; 
    242   if ( (this->trigs = (double *)calloc(ntrigs, sizeof(double))) == 
     242  if ( (this->trigs = (double *)calloc((size_t) ntrigs, sizeof(double))) == 
    243243       (double *)NULL) 
    244244    return -1; 
    245   if ( (this->ifax = (long *)calloc(13, sizeof(long))) == (long *)NULL) 
     245  if ( (this->ifax = (long *)calloc((size_t) 13, sizeof(long))) == (long *)NULL) 
    246246  { 
    247247    free(this->trigs); 
Note: See TracChangeset for help on using the changeset viewer.