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:
Anton Maklakov
2018-05-24 19:29:33 +08:00
committed by bot
parent 2a810a318f
commit 714a9bda92

View File

@@ -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;