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:
Mingqiang Chi
2018-07-05 10:26:45 +08:00
committed by lijinxia
parent 91ef6ed59b
commit 666430a3d4
24 changed files with 65 additions and 63 deletions

View File

@@ -113,7 +113,7 @@ int io_instr_vmexit_handler(struct vcpu *vcpu)
if (status != 0) {
uint64_t *rax = &cur_context->guest_cpu_regs.regs.rax;
memset(&vcpu->req, 0, sizeof(struct vhm_request));
(void)memset(&vcpu->req, 0, sizeof(struct vhm_request));
dm_emulate_pio_pre(vcpu, exit_qual, sz, *rax);
status = acrn_insert_request_wait(vcpu, &vcpu->req);
}
@@ -220,12 +220,12 @@ void setup_io_bitmap(struct vm *vm)
(vm->arch_vm.iobitmap[1] != NULL), "");
if (is_vm0(vm)) {
memset(vm->arch_vm.iobitmap[0], 0x00, CPU_PAGE_SIZE);
memset(vm->arch_vm.iobitmap[1], 0x00, CPU_PAGE_SIZE);
(void)memset(vm->arch_vm.iobitmap[0], 0x00, CPU_PAGE_SIZE);
(void)memset(vm->arch_vm.iobitmap[1], 0x00, CPU_PAGE_SIZE);
} else {
/* block all IO port access from Guest */
memset(vm->arch_vm.iobitmap[0], 0xFF, CPU_PAGE_SIZE);
memset(vm->arch_vm.iobitmap[1], 0xFF, CPU_PAGE_SIZE);
(void)memset(vm->arch_vm.iobitmap[0], 0xFF, CPU_PAGE_SIZE);
(void)memset(vm->arch_vm.iobitmap[1], 0xFF, CPU_PAGE_SIZE);
}
}