mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
fatfs: fix errors for GCC 8 support and some indentation
components/fatfs/src/ff.c: In function 'f_fdisk': components/fatfs/src/ff.c:5995:5: error: this 'for' clause does not guard... [-Werror=misleading-indentation] for (n = 16; n < 256 && sz_disk / n / cluster_size > 1024; n *= 2) ; ^~~ components/fatfs/src/ff.c:5996:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' if (n == 256) n--; ^~
This commit is contained in:
@@ -5991,7 +5991,10 @@ FRESULT f_fdisk (
|
||||
if (!buf) return FR_NOT_ENOUGH_CORE;
|
||||
|
||||
/* Determine the CHS without any consideration of the drive geometry */
|
||||
for (n = 16; n < 256 && sz_disk / n / cluster_size > 1024; n *= 2) ;
|
||||
for (n = 16; n < 256 && sz_disk / n / cluster_size > 1024; n *= 2)
|
||||
{
|
||||
;
|
||||
}
|
||||
if (n == 256) n--;
|
||||
if (sz_disk < SUPPORTED_FLASH_SIZE) {
|
||||
cluster_size = 1;
|
||||
|
Reference in New Issue
Block a user