mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +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:
@@ -272,7 +272,7 @@ void *calloc(unsigned int num_elements, unsigned int element_size)
|
||||
/* Determine if memory was allocated */
|
||||
if (memory != NULL) {
|
||||
/* Zero all the memory */
|
||||
memset(memory, 0, num_elements * element_size);
|
||||
(void)memset(memory, 0, num_elements * element_size);
|
||||
}
|
||||
|
||||
/* Return pointer to memory */
|
||||
|
||||
Reference in New Issue
Block a user