SD card, pff.c: silence a warning.
Let the preprocessor decide wether this piece of code is compiled at all. Previous behaviour was to compile it unconditionally and rely on the optimizer to remove it after that. Trusting the optimizer is fine, but only if the code is warning-free in all cases.
This commit is contained in:
parent
9de0c65460
commit
7762408d5c
14
pff.c
14
pff.c
|
|
@ -433,14 +433,18 @@ CLUST get_clust (
|
|||
BYTE* dir /* Pointer to directory entry */
|
||||
)
|
||||
{
|
||||
FATFS *fs = FatFs;
|
||||
CLUST clst = 0;
|
||||
|
||||
|
||||
if (_FS_32ONLY || (_FS_FAT32 && fs->fs_type == FS_FAT32)) {
|
||||
clst = LD_WORD(dir+DIR_FstClusHI);
|
||||
clst <<= 16;
|
||||
}
|
||||
#if _FS_FAT32
|
||||
#if ! _FS_32ONLY
|
||||
if (FatFs->fs_type == FS_FAT32)
|
||||
#endif
|
||||
{
|
||||
clst = LD_WORD(dir+DIR_FstClusHI);
|
||||
clst <<= 16;
|
||||
}
|
||||
#endif
|
||||
clst |= LD_WORD(dir+DIR_FstClusLO);
|
||||
|
||||
return clst;
|
||||
|
|
|
|||
Loading…
Reference in New Issue