Changeset a36e988 in rtems


Ignore:
Timestamp:
Dec 2, 2002, 7:14:27 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
35ee867
Parents:
36ea4c2a
Message:

2002-12-02 Joel Sherrill <joel@…>

  • src/dosfs/fat.h, src/dosfs/msdos.h: Added casts to remove warnings on 16 bit targets like the h8300.
Location:
cpukit/libfs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/ChangeLog

    r36ea4c2a ra36e988  
     12002-12-02      Joel Sherrill <joel@OARcorp.com>
     2
     3        * src/dosfs/fat.h, src/dosfs/msdos.h: Added casts to remove warnings
     4        on 16 bit targets like the h8300.
     5
    162002-11-19      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    27
  • cpukit/libfs/src/dosfs/fat.h

    r36ea4c2a ra36e988  
    5252
    5353#if (CPU_BIG_ENDIAN == TRUE)
    54 #    define CF_LE_W(v) CPU_swap_u16(v)
    55 #    define CF_LE_L(v) CPU_swap_u32(v)
    56 #    define CT_LE_W(v) CPU_swap_u16(v)
    57 #    define CT_LE_L(v) CPU_swap_u32(v)
     54#    define CF_LE_W(v) CPU_swap_u16((unsigned16)v)
     55#    define CF_LE_L(v) CPU_swap_u32((unsigned32)v)
     56#    define CT_LE_W(v) CPU_swap_u16((unsigned16)v)
     57#    define CT_LE_L(v) CPU_swap_u32((unsigned32)v)
    5858#else 
    5959#    define CF_LE_W(v) (v)
     
    8282#define FAT_FAT32              0x04
    8383 
    84 #define FAT_UNDEFINED_VALUE     0xFFFFFFFF
     84#define FAT_UNDEFINED_VALUE     (unsigned32)0xFFFFFFFF
    8585
    8686#define FAT_FAT12_EOC          0x0FFF
    8787#define FAT_FAT16_EOC          0xFFFF
    88 #define FAT_FAT32_EOC          0x0FFFFFFF
     88#define FAT_FAT32_EOC          (unsigned32)0x0FFFFFFF
    8989
    9090#define FAT_FAT12_FREE         0x0000
     
    9292#define FAT_FAT32_FREE         0x00000000
    9393
    94 #define FAT_GENFAT_EOC         0xFFFFFFFF
    95 #define FAT_GENFAT_FREE        0x00000000
     94#define FAT_GENFAT_EOC         (unsigned32)0xFFFFFFFF
     95#define FAT_GENFAT_FREE        (unsigned32)0x00000000
    9696
    9797#define FAT_FAT12_SHIFT        0x04
     
    9999#define FAT_FAT12_MASK         0x00000FFF
    100100#define FAT_FAT16_MASK         0x0000FFFF
    101 #define FAT_FAT32_MASK         0x0FFFFFFF
     101#define FAT_FAT32_MASK         (unsigned32)0x0FFFFFFF
    102102
    103103#define FAT_MAX_BPB_SIZE       90
     
    112112                  ((*((unsigned8 *)(x) + (ofs) + 1)) << 8) )
    113113
    114 #define FAT_VAL32(x, ofs)                                          \
    115     (unsigned32)( (*((unsigned8 *)(x) + (ofs))) |                  \
    116                   ((*((unsigned8 *)(x) + (ofs) + 1)) << 8) |      \
    117                   ((*((unsigned8 *)(x) + (ofs) + 2)) << 16) |      \
    118                   ((*((unsigned8 *)(x) + (ofs) + 3)) << 24) )
     114#define FAT_VAL32(x, ofs)                                                 \
     115    (unsigned32)( (unsigned32)(*((unsigned8 *)(x) + (ofs))) |             \
     116                  ((unsigned32)(*((unsigned8 *)(x) + (ofs) + 1)) << 8)  | \
     117                  ((unsigned32)(*((unsigned8 *)(x) + (ofs) + 2)) << 16) | \
     118                  ((unsigned32)(*((unsigned8 *)(x) + (ofs) + 3)) << 24) )
    119119                   
    120120/* macros to access boot sector fields */
  • cpukit/libfs/src/dosfs/msdos.h

    r36ea4c2a ra36e988  
    101101#define MSDOS_EXTRACT_CLUSTER_NUM(p)                                         \
    102102            (unsigned32)( (CF_LE_W(*MSDOS_DIR_FIRST_CLUSTER_LOW(p))) |       \
    103                           ((CF_LE_W((*MSDOS_DIR_FIRST_CLUSTER_HI(p))))<<16) )
     103                          ((unsigned32)(CF_LE_W((*MSDOS_DIR_FIRST_CLUSTER_HI(p))))<<16) )
    104104
    105105/*
Note: See TracChangeset for help on using the changeset viewer.