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 memcpy_s and strcpy_s
It will print error information inside memcpy_s if
the parameteter is invalid, the caller can not check
the return value for memcpy_s/strcpy_s/strncpy_s
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>
This commit is contained in:
@@ -17,7 +17,7 @@ int hkdf_sha256(uint8_t *out_key, size_t out_len,
|
||||
* to derive multiple seeds in order to support multiple
|
||||
* AaaG/Trusty instances.
|
||||
*/
|
||||
memcpy_s(out_key, out_len, secret, secret_len);
|
||||
(void)memcpy_s(out_key, out_len, secret, secret_len);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user