fix MDK AC5 build warnings

This commit is contained in:
yangpeng
2024-02-04 10:20:18 +08:00
committed by Meco Man
parent d5e2df46e5
commit 25d3136d02
5 changed files with 11 additions and 8 deletions

View File

@@ -186,12 +186,13 @@ static int is_gpt_valid(struct rt_mmcsd_card *card, size_t lba, gpt_header **gpt
{
size_t lastlba;
if (!ptes)
if (!ptes || !gpt)
{
return 0;
}
if (!(*gpt = alloc_read_gpt_header(card, lba)))
*gpt = alloc_read_gpt_header(card, lba);
if (!(*gpt))
{
return 0;
}
@@ -255,7 +256,8 @@ static int is_gpt_valid(struct rt_mmcsd_card *card, size_t lba, gpt_header **gpt
goto fail;
}
if (!(*ptes = alloc_read_gpt_entries(card, *gpt)))
*ptes = alloc_read_gpt_entries(card, *gpt);
if (!(*ptes))
{
goto fail;
}