Changeset a36e988 in rtems for cpukit/libfs/src/dosfs/fat.h


Ignore:
Timestamp:
Dec 2, 2002, 7:14:27 PM (19 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 */
Note: See TracChangeset for help on using the changeset viewer.