mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 13:55:26 +08:00
fix MDK AC5 build warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user