mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-15 05:49:17 +00:00
hv:fix "missing for discarded return value" for memset
No need to check the return value for memset code like this: int a(void) { return 0; } int b(void){ a(); } fix as follow: int a(void) { return 0; } int b(void){ (void)a(); } Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -52,7 +52,7 @@ void parse_seed_list(struct seed_list_hob *seed_hob)
|
||||
dseed_index++;
|
||||
|
||||
/* erase original seed in seed entry */
|
||||
memset(entry->seed, 0, sizeof(struct seed_info));
|
||||
(void)memset(entry->seed, 0, sizeof(struct seed_info));
|
||||
}
|
||||
|
||||
entry = (struct seed_entry *)((uint8_t *)entry +
|
||||
@@ -60,10 +60,10 @@ void parse_seed_list(struct seed_list_hob *seed_hob)
|
||||
}
|
||||
|
||||
trusty_set_dseed(dseed_list, dseed_index);
|
||||
memset(dseed_list, 0, sizeof(dseed_list));
|
||||
(void)memset(dseed_list, 0, sizeof(dseed_list));
|
||||
return;
|
||||
|
||||
fail:
|
||||
trusty_set_dseed(NULL, 0);
|
||||
memset(dseed_list, 0, sizeof(dseed_list));
|
||||
(void)memset(dseed_list, 0, sizeof(dseed_list));
|
||||
}
|
||||
|
Reference in New Issue
Block a user