diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-21 02:05:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-21 02:05:59 +0000 |
commit | 45d04be87af60e5f002c0539ac87181c7583cdab (patch) | |
tree | 599fea72ab3154bdb24a477b731e46e1a01828d1 /nuttx/fs | |
parent | d30d34a6c826747aa920cb5495a635cb758858a0 (diff) | |
download | px4-nuttx-45d04be87af60e5f002c0539ac87181c7583cdab.tar.gz px4-nuttx-45d04be87af60e5f002c0539ac87181c7583cdab.tar.bz2 px4-nuttx-45d04be87af60e5f002c0539ac87181c7583cdab.zip |
AVR build warnings; minor USB fix
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3729 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r-- | nuttx/fs/fat/fs_fat32.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h index 59dbb1f8b..ca5915098 100644 --- a/nuttx/fs/fat/fs_fat32.h +++ b/nuttx/fs/fat/fs_fat32.h @@ -235,19 +235,21 @@ #define FAT_MAXCLUST12 ((1 << 12) - 16) -/* FAT16: For M$, the calculation is ((1 << 16) - 19). */ +/* FAT16: For M$, the calculation is ((1 << 16) - 19). (The uint32_t cast is + * needed for architectures where int is only 16 bits). + */ #define FAT_MINCLUST16 (FAT_MAXCLUST12 + 1) -#define FAT_MAXCLUST16 ((1 << 16) - 16) +#define FAT_MAXCLUST16 (((uint32_t)1 << 16) - 16) /* FAT32: M$ reserves the MS 4 bits of a FAT32 FAT entry so only 18 bits are - * available. For M$, the calculation is ((1 << 28) - 19). + * available. For M$, the calculation is ((1 << 28) - 19). (The uint32_t cast + * is needed for architectures where int is only 16 bits). */ #define FAT_MINCLUST32 65524 /* #define FAT_MINCLUST32 (FAT_MAXCLUST16 + 1) */ -#define FAT_MAXCLUST32 ((1 << 28) - 16) - +#define FAT_MAXCLUST32 (((uint32_t)1 << 28) - 16) /**************************************************************************** * Access to data in raw sector data */ |