Skip to content

Commit f559b7c

Browse files
committed
fix(components): Compiler reports some warnings
esp-idf/components/fatfs/diskio/diskio_rawflash.c warning: unused variable 'part' [-Wunused-variable] XX | const esp_partition_t* part = s_ff_raw_handles[pdrv]; | ^~~~ esp-idf/components/fatfs/vfs/vfs_fat_sdmmc.c warning: unused variable 'found' [-Wunused-variable] XXX | bool found = s_get_context_id_by_card(card, &id); | ^~~~~
1 parent c586527 commit f559b7c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Diff for: components/fatfs/diskio/diskio_rawflash.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ DRESULT ff_raw_write (BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)
9191

9292
DRESULT ff_raw_ioctl (BYTE pdrv, BYTE cmd, void *buff)
9393
{
94-
const esp_partition_t* part = s_ff_raw_handles[pdrv];
9594
ESP_LOGV(TAG, "ff_raw_ioctl: cmd=%in", cmd);
96-
assert(part);
95+
assert(s_ff_raw_handles[pdrv]);
96+
9797
switch (cmd) {
9898
case CTRL_SYNC:
9999
return RES_OK;

Diff for: components/fatfs/vfs/vfs_fat_sdmmc.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,12 @@ esp_err_t esp_vfs_fat_sdcard_format_cfg(const char *base_path, sdmmc_card_t *car
500500

501501
//format
502502
uint32_t id = FF_VOLUMES;
503-
bool found = s_get_context_id_by_card(card, &id);
504-
assert(found);
503+
504+
{
505+
bool found = s_get_context_id_by_card(card, &id);
506+
(void)found;
507+
assert(found);
508+
}
505509

506510
if (cfg) {
507511
s_ctx[id]->mount_config = *cfg;

0 commit comments

Comments
 (0)