mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: fixed compiling warning
removed some unnecessary variables and functions. v1-->v2: Replace div-by-zero with an inline ASM code Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -916,7 +916,10 @@ static int shell_trigger_crash(int argc, char **argv)
|
||||
(void)argv;
|
||||
snprintf(str, MAX_STR_SIZE, "trigger crash, divide by 0 ...\r\n");
|
||||
shell_puts(str);
|
||||
snprintf(str, MAX_STR_SIZE, "%d\r", 1/0);
|
||||
|
||||
asm("movl $0x1, %eax");
|
||||
asm("movl $0x0, %ecx");
|
||||
asm("idiv %ecx");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user