Skip to content

Commit

Permalink
fix(components): Compiler reports some warnings
Browse files Browse the repository at this point in the history
esp-idf/components/driver/twai/twai.c warning: unused variable 'res' [-Wunused-variable]
  XXX |     bool res = twai_hal_init(&p_twai_obj->hal, &hal_config);
      |          ^~~
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);
      |          ^~~~~
commit 3251f11
Merge: d5bcee1 c586527
Author: safocl <[email protected]>
Date:   Wed Jan 29 21:20:31 2025 +0400

    Merge branch 'espressif:master' into safocl_dev2

commit d5bcee1
Merge: fc64848 5950be0
Author: safocl <[email protected]>
Date:   Sun Jan 26 01:51:52 2025 +0400

    Merge branch 'espressif:master' into safocl_dev2

commit fc64848
Merge: 74be130 0f0068f
Author: safocl <[email protected]>
Date:   Mon Jan 20 13:11:50 2025 +0400

    Merge branch 'espressif:master' into safocl_dev2

commit 74be130
Author: safocl <[email protected]>
Date:   Mon Jan 20 13:11:29 2025 +0400

    Actualization twai.c

commit 447ae87
Author: safocl <[email protected]>
Date:   Mon Dec 23 12:34:59 2024 +0400

    fix(components): Compiler reports some warnings
    esp-idf/components/driver/twai/twai.c warning: unused variable 'res' [-Wunused-variable]
      XXX |     bool res = twai_hal_init(&p_twai_obj->hal, &hal_config);
          |          ^~~
    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);
          |          ^~~~~
  • Loading branch information
safocl committed Jan 29, 2025
1 parent c586527 commit 63d7790
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions components/fatfs/diskio/diskio_rawflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ DRESULT ff_raw_write (BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)

DRESULT ff_raw_ioctl (BYTE pdrv, BYTE cmd, void *buff)
{
const esp_partition_t* part = s_ff_raw_handles[pdrv];
ESP_LOGV(TAG, "ff_raw_ioctl: cmd=%in", cmd);
assert(part);
{
const esp_partition_t* part = s_ff_raw_handles[pdrv];
ESP_LOGV(TAG, "ff_raw_ioctl: cmd=%in", cmd);
(void)part;
assert(part);
}

switch (cmd) {
case CTRL_SYNC:
return RES_OK;
Expand Down
8 changes: 6 additions & 2 deletions components/fatfs/vfs/vfs_fat_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,12 @@ esp_err_t esp_vfs_fat_sdcard_format_cfg(const char *base_path, sdmmc_card_t *car

//format
uint32_t id = FF_VOLUMES;
bool found = s_get_context_id_by_card(card, &id);
assert(found);

{
bool found = s_get_context_id_by_card(card, &id);
(void)found;
assert(found);
}

if (cfg) {
s_ctx[id]->mount_config = *cfg;
Expand Down

0 comments on commit 63d7790

Please sign in to comment.