Changeset 199ccde in rtems


Ignore:
Timestamp:
May 8, 2009, 4:55:53 AM (10 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
1cf6593e
Parents:
61541f4
Message:

2009-05-08 Chris Johns <chrisj@…>

  • cpukit/libblock/src/bdpart.c, libmisc/shell/main_msdosfmt.c, libmisc/shell/main_rm.c, libnetworking/libc/gethostnamadr.c, score/include/rtems/score/bitfield.h, score/inline/rtems/score/priority.inl: Remove warnings.
Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r61541f4 r199ccde  
     12009-05-08      Chris Johns <chrisj@rtems.org>
     2
     3        * cpukit/libblock/src/bdpart.c, libmisc/shell/main_msdosfmt.c,
     4        libmisc/shell/main_rm.c, libnetworking/libc/gethostnamadr.c,
     5        score/include/rtems/score/bitfield.h,
     6        score/inline/rtems/score/priority.inl: Remove warnings.
     7
    182009-05-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • cpukit/libblock/src/bdpart.c

    r61541f4 r199ccde  
    853853
    854854    /* Set partition number for logical disk name */
    855     rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%u", i + 1);
     855    rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%lu", i + 1);
    856856    if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
    857857      esc = RTEMS_INVALID_NAME;
     
    945945)
    946946{
    947   rtems_status_code sc = RTEMS_SUCCESSFUL;
    948947  rtems_status_code esc = RTEMS_SUCCESSFUL;
    949948  const char *disk_file_name = strrchr( disk_name, '/');
     
    990989  for (i = 0; i < count; ++i) {
    991990    /* Create logical disk name */
    992     int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%u", i + 1);
     991    int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%lu", i + 1);
    993992    if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
    994993      esc = RTEMS_INVALID_NAME;
     
    10321031)
    10331032{
    1034   rtems_status_code sc = RTEMS_SUCCESSFUL;
    10351033  rtems_status_code esc = RTEMS_SUCCESSFUL;
    10361034  const char *disk_file_name = strrchr( disk_name, '/');
     
    10671065  for (i = 0; i < count; ++i) {
    10681066    /* Create mount point */
    1069     int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%u", i + 1);
     1067    int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%lu", i + 1);
    10701068    if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
    10711069      esc = RTEMS_INVALID_NAME;
  • cpukit/libmisc/shell/main_msdosfmt.c

    r61541f4 r199ccde  
    131131    printf (" %-20s: %s\n", "OEMName", "RTEMS");
    132132    printf (" %-20s: %s\n", "VolLabel", "RTEMSDisk");
    133     printf (" %-20s: %i\n", "sectors per cluster", rqdata.sectors_per_cluster);
    134     printf (" %-20s: %i\n", "fats", rqdata.fat_num);
    135     printf (" %-20s: %i\n", "files per root dir", rqdata.files_per_root_dir);
     133    printf (" %-20s: %lu\n", "sectors per cluster", rqdata.sectors_per_cluster);
     134    printf (" %-20s: %lu\n", "fats", rqdata.fat_num);
     135    printf (" %-20s: %lu\n", "files per root dir", rqdata.files_per_root_dir);
    136136    printf (" %-20s: %i\n", "fat type", rqdata.fattype);
    137137    printf (" %-20s: %d\n", "media", rqdata.media);
    138138    printf (" %-20s: %d\n", "quick_format", rqdata.quick_format);
    139     printf (" %-20s: %i\n", "cluster align", rqdata.cluster_align);
     139    printf (" %-20s: %lu\n", "cluster align", rqdata.cluster_align);
    140140  }
    141141 
  • cpukit/libmisc/shell/main_rm.c

    r61541f4 r199ccde  
    580580                    *flagsp ? flagsp : "", *flagsp ? " " : "",
    581581                    path);
     582#if RTEMS_REMOVED
    582583                free(flagsp);
     584#endif
    583585        }
    584586        (void)fflush(stderr);
  • cpukit/libnetworking/libc/gethostnamadr.c

    r61541f4 r199ccde  
    273273  result->h_aliases[0]=0;
    274274
    275   cur=buf+16*sizeof(char*);
    276   max=buf+buflen;
     275  cur=(unsigned char*)buf+16*sizeof(char*);
     276  max=(unsigned char*)buf+buflen;
    277277  names=ips=0;
    278278
     
    283283  }
    284284  {
    285     tmp=inpkg+12;
     285    tmp=(char*)inpkg+12;
    286286    {
    287287      char Name[257];
     
    297297      if (q<1) goto nodata;
    298298      while (q>0) {
    299   int decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),Name,256,inpkg+size);
     299        int decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),(unsigned char*)Name,256,inpkg+size);
    300300  if (decofs<0) break;
    301   tmp=inpkg+decofs;
     301  tmp=(char*)inpkg+decofs;
    302302  --q;
    303303  if (tmp[0]!=0 || tmp[1]!=lookfor || /* TYPE != A */
     
    305305    if (tmp[1]==5) {  /* CNAME */
    306306      tmp+=10;
    307       decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),Name,256,inpkg+size);
     307      decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),(unsigned char*)Name,256,inpkg+size);
    308308      if (decofs<0) break;
    309       tmp=inpkg+decofs;
     309      tmp=(char*)inpkg+decofs;
    310310    } else
    311311      break;
     
    319319      if (cur+slen+8+(lookfor==28?12:0)>=max) { *h_errnop=NO_RECOVERY; return -1; }
    320320    } else if (lookfor==12) /* PTR */ {
    321       decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),Name,256,inpkg+size);
     321      decofs=__dns_decodename(inpkg,(size_t)(tmp-(char*)inpkg),(unsigned char*)Name,256,inpkg+size);
    322322      if (decofs<0) break;
    323       tmp=inpkg+decofs;
     323      tmp=(char*)inpkg+decofs;
    324324      slen=strlen(Name);
    325325    } else
    326326      slen=strlen(Name);
    327     strcpy(cur,Name);
     327    strcpy((char*)cur,Name);
    328328    if (names==0)
    329       result->h_name=cur;
     329      result->h_name=(char*)cur;
    330330    else
    331       result->h_aliases[names-1]=cur;
     331      result->h_aliases[names-1]=(char*)cur;
    332332    result->h_aliases[names]=0;
    333333    if (names<8) ++names;
    334334/*    cur+=slen+1; */
    335335    cur+=(slen|3)+1;
    336     result->h_addr_list[ips++] = cur;
     336    result->h_addr_list[ips++] = (char*)cur;
    337337    if (lookfor==1) /* A */ {
    338338      *(int*)cur=*(int*)tmp;
  • cpukit/score/include/rtems/score/bitfield.h

    r61541f4 r199ccde  
    9191    \
    9292    if ( __value < 0x100 ) \
    93       (_bit_number) = __p[ __value ] + 8; \
     93      (_bit_number) = (Priority_Bit_map_control)( __p[ __value ] + 8 ); \
    9494    else \
    95       (_bit_number) = __p[ __value >> 8 ]; \
     95      (_bit_number) = (Priority_Bit_map_control)( __p[ __value >> 8 ] ); \
    9696  }
    9797#endif
  • cpukit/score/inline/rtems/score/priority.inl

    r61541f4 r199ccde  
    6565 */
    6666
    67 RTEMS_INLINE_ROUTINE uint32_t   _Priority_Major (
     67RTEMS_INLINE_ROUTINE Priority_Bit_map_control   _Priority_Major (
    6868  Priority_Control the_priority
    6969)
    7070{
    71   return ( the_priority / 16 );
     71  return (Priority_Bit_map_control)( the_priority / 16 );
    7272}
    7373
     
    7676 */
    7777
    78 RTEMS_INLINE_ROUTINE uint32_t   _Priority_Minor (
     78RTEMS_INLINE_ROUTINE Priority_Bit_map_control   _Priority_Minor (
    7979  Priority_Control the_priority
    8080)
    8181{
    82   return ( the_priority % 16 );
     82  return (Priority_Bit_map_control)( the_priority % 16 );
    8383}
    8484
     
    9090 */
    9191 
    92 RTEMS_INLINE_ROUTINE uint32_t   _Priority_Mask (
     92RTEMS_INLINE_ROUTINE Priority_Bit_map_control   _Priority_Mask (
    9393  uint32_t   bit_number
    9494)
    9595{
    96   return (0x8000u >> bit_number);
    97 }
    98  
     96  return (Priority_Bit_map_control)(0x8000u >> bit_number);
     97}
     98 
     99/**
     100 *  This function returns the mask bit inverted.
     101 */
     102 
     103RTEMS_INLINE_ROUTINE Priority_Bit_map_control   _Priority_Mask_invert (
     104  uint32_t   mask
     105)
     106{
     107  return (Priority_Bit_map_control)(~mask);
     108}
     109
    99110 
    100111/**
     
    181192  mask = _Priority_Mask( major );
    182193  the_priority_map->ready_major = mask;
    183   the_priority_map->block_major = ~mask;
     194  /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */
     195  the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask));
    184196
    185197  mask = _Priority_Mask( minor );
    186198  the_priority_map->ready_minor = mask;
    187   the_priority_map->block_minor = ~mask;
     199  /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */
     200  the_priority_map->block_minor = (Priority_Bit_map_control)(~((uint32_t)mask));
    188201}
    189202
Note: See TracChangeset for help on using the changeset viewer.