Просмотр исходного кода

Merge branch 'fix/fatfs_ff_volumes_warning' into 'master'

fix(fatfs): Fix a warning when FF_VOLUMES is set to 1

Closes IDFGH-10887

See merge request espressif/esp-idf!25422
Adam Múdry 2 лет назад
Родитель
Сommit
f75bc09cee
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      components/fatfs/diskio/diskio.c

+ 2 - 0
components/fatfs/diskio/diskio.c

@@ -21,7 +21,9 @@ static ff_diskio_impl_t * s_impls[FF_VOLUMES] = { NULL };
 #if FF_MULTI_PARTITION		/* Multiple partition configuration */
 const PARTITION VolToPart[FF_VOLUMES] = {
     {0, 0},    /* Logical drive 0 ==> Physical drive 0, auto detection */
+#if FF_VOLUMES > 1
     {1, 0},    /* Logical drive 1 ==> Physical drive 1, auto detection */
+#endif
 #if FF_VOLUMES > 2
     {2, 0},     /* Logical drive 2 ==> Physical drive 2, auto detection */
 #endif