HV: fix violations touched type conversion

ACRN Coding guidelines requires type conversion shall be explicity.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2019-07-09 15:40:13 +08:00
committed by wenlingz
parent 5d6c9c33ca
commit 714162fb8b
13 changed files with 26 additions and 25 deletions

View File

@@ -79,10 +79,11 @@ static void vuart_console_rx_chars(struct acrn_vuart *vu)
*/
static void vuart_console_tx_chars(struct acrn_vuart *vu)
{
char c;
char c = vuart_getchar(vu);
while ((c = vuart_getchar(vu)) != -1) {
while(c != -1) {
printf("%c", c);
c = vuart_getchar(vu);
}
}

View File

@@ -1382,7 +1382,7 @@ void profiling_pre_vmexit_handler(struct acrn_vcpu *vcpu)
get_cpu_var(profiling_info.vm_info).guest_cs
= exec_vmread64(VMX_GUEST_CS_SEL);
get_cpu_var(profiling_info.vm_info).guest_vm_id = (int32_t)vcpu->vm->vm_id;
get_cpu_var(profiling_info.vm_info).guest_vm_id = (int16_t)vcpu->vm->vm_id;
}
}

View File

@@ -876,8 +876,8 @@ static int32_t shell_to_vm_console(int32_t argc, char **argv)
struct acrn_vm *vm;
struct acrn_vuart *vu;
if (argc == 2U) {
vm_id = sanitize_vmid(strtol_deci(argv[1]));
if (argc == 2) {
vm_id = sanitize_vmid((uint16_t)strtol_deci(argv[1]));
}
/* Get the virtual device node */