mirror of
https://github.com/FreeRTOS/Lab-Project-FreeRTOS-FAT.git
synced 2025-10-17 15:41:34 +08:00
Small Type and Qualifier Fixes (#67)
Otherwise the condition is always true for 64-bit architectures. GCC warned me about this when compiling AARCH64 (-Wtype-limits).
This commit is contained in:
4
ff_dir.c
4
ff_dir.c
@@ -2884,9 +2884,9 @@ FF_Error_t FF_ExtendDirectory( FF_IOManager_t * pxIOManager,
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#if ( ffconfigUNICODE_UTF16_SUPPORT != 0 )
|
||||
BaseType_t FF_IsNameCompliant( FF_T_WCHAR * pcName )
|
||||
BaseType_t FF_IsNameCompliant( const FF_T_WCHAR * pcName )
|
||||
#else
|
||||
BaseType_t FF_IsNameCompliant( char * pcName )
|
||||
BaseType_t FF_IsNameCompliant( const char * pcName )
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
{
|
||||
|
4
ff_fat.c
4
ff_fat.c
@@ -712,7 +712,7 @@ uint32_t FF_FindEndOfChain( FF_IOManager_t * pxIOManager,
|
||||
{
|
||||
/* Traverse FAT for (2^32-1) items/clusters,
|
||||
* or until end-of-chain is encountered. */
|
||||
ulFatEntry = FF_TraverseFAT( pxIOManager, ulStart, ( uint32_t ) ~0UL, &xError );
|
||||
ulFatEntry = FF_TraverseFAT( pxIOManager, ulStart, ~( ( uint32_t ) 0U ), &xError );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1496,7 +1496,7 @@ uint32_t FF_CountFreeClusters( FF_IOManager_t * pxIOManager,
|
||||
{
|
||||
ulFreeClusters = FF_getLong( pxBuffer->pucBuffer, 488 );
|
||||
|
||||
if( ulFreeClusters != ~0ul )
|
||||
if( ulFreeClusters != ~( ( uint32_t ) 0U ) )
|
||||
{
|
||||
xInfoKnown = pdTRUE;
|
||||
}
|
||||
|
@@ -177,9 +177,9 @@ int8_t FF_PushEntry( FF_IOManager_t * pxIOManager,
|
||||
* contains any legal characters only.
|
||||
*/
|
||||
#if ( ffconfigUNICODE_UTF16_SUPPORT != 0 )
|
||||
BaseType_t FF_IsNameCompliant( FF_T_WCHAR * pcName );
|
||||
BaseType_t FF_IsNameCompliant( const FF_T_WCHAR * pcName );
|
||||
#else
|
||||
BaseType_t FF_IsNameCompliant( char * pcName );
|
||||
BaseType_t FF_IsNameCompliant( const char * pcName );
|
||||
#endif
|
||||
|
||||
static portINLINE BaseType_t FF_isEndOfDir( const uint8_t * pucEntryBuffer )
|
||||
|
Reference in New Issue
Block a user