Changeset 4928


Ignore:
Timestamp:
07/18/12 16:51:44 (6 years ago)
Author:
paulf
Message:

cleaned up some minor compiler warnings in read_arc.c

File:
1 edited

Legend:

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

    r4863 r4928  
    121121  /* Initialize the output structure 
    122122  **********************************/ 
    123   memset( sumP, 0, sizeof(struct Hsum) );  
     123  memset( sumP, 0, (size_t) sizeof(struct Hsum) );  
    124124  
    125125  /* Copy incoming string to a local buffer so we can alter it. 
    126126  ************************************************************/ 
    127   strncpy ( str, sumLine, 165 ); /* this should be enough chars for us */ 
     127  strncpy ( str, sumLine, (size_t) 165 ); /* this should be enough chars for us */ 
    128128  len = strlen( sumLine );       /* note length of original summary line */ 
    129129 
     
    141141  /* Read origin time 
    142142  ******************/ 
    143   strncpy( sumP->cdate,    str,     14 ); /* YYYYMMDDHHMMSS */ 
     143  strncpy( sumP->cdate,    str,     (size_t) 14 ); /* YYYYMMDDHHMMSS */ 
    144144  sumP->cdate[14] = '.'; 
    145   strncpy( sumP->cdate+15, str+14,  2 );  /* hundreths of seconds */ 
     145  strncpy( sumP->cdate+15, str+14,  (size_t) 2 );  /* hundreths of seconds */ 
    146146  sumP->cdate[17] = '\0'; 
    147147  sumP->ot = julsec17( sumP->cdate ); 
     
    200200  read_fl2( str+76, &sumP->e2 ); 
    201201  str[76]  = '\0'; 
    202   strncpy( sumP->reg, str+73, 4 ); 
     202  strncpy( sumP->reg, str+73, (size_t) 4 ); 
    203203  str[73]  = '\0'; 
    204204  read_fl2( str+70, &sumP->Md ); 
     
    281281  /* Copy phase string to a local buffer so we can alter it. 
    282282  ************************************************************/ 
    283   memset(str,0,120); 
    284   strncpy ( str, phs, 120 ); 
     283  memset(str,0,(size_t) 120); 
     284  strncpy ( str, phs, (size_t) 120 ); 
    285285 
    286286  /* Data source code */ 
     
    348348 
    349349  /* Figure out the common time */ 
    350   strncpy( pckP->cdate, str+17, 12 ); /* YYYYMMDDHHMM */ 
     350  strncpy( pckP->cdate, str+17, (size_t) 12 ); /* YYYYMMDDHHMM */ 
    351351  pckP->cdate[12] = '\0'; 
    352352  strcat(pckP->cdate, "00.00" ); 
     
    398398  /* Copy shadow string to a local buffer so we can alter it. 
    399399  ************************************************************/ 
    400   memset(str,0,120); 
    401   strncpy ( str, shdw, 120 ); 
     400  memset(str,0,(size_t) 120); 
     401  strncpy ( str, shdw, (size_t) 120 ); 
    402402 
    403403  str[88+4] = '\0'; 
Note: See TracChangeset for help on using the changeset viewer.