Re: [PATCH] sample/acrn: Remove redundant assignment to itself
From: Greg KH
Date: Fri Dec 06 2024 - 01:22:12 EST
On Fri, Dec 06, 2024 at 10:41:27AM +0800, liujing wrote:
> Delete the self-redundancy assignment for sig, argc, and argv.
But perhaps they are there for a reason?
> Signed-off-by: liujing <liujing@xxxxxxxxxxxxxxxxxxxx>
>
> diff --git a/samples/acrn/vm-sample.c b/samples/acrn/vm-sample.c
> index c61e0f91456e..f6d62d1659ef 100644
> --- a/samples/acrn/vm-sample.c
> +++ b/samples/acrn/vm-sample.c
> @@ -34,7 +34,6 @@ int is_running = 1;
>
> void vm_exit(int sig)
> {
> - sig = sig;
>
> is_running = 0;
> ioctl(hsm_fd, ACRN_IOCTL_PAUSE_VM, vmid);
> @@ -50,8 +49,6 @@ int main(int argc, char **argv)
> struct acrn_io_request *io_req;
> struct acrn_ioreq_notify __attribute__((aligned(8))) notify;
>
> - argc = argc;
> - argv = argv;
If you remove these, odds are now you will have build errors/warnings,
right? That's why someone added these.
sorry,
greg k-h