All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: Jeff Cody <jcody@redhat.com>, <qemu-devel@nongnu.org>
Cc: <qemu-block@nongnu.org>, <mark.cave-ayland@ilande.co.uk>,
	<quintela@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>,
	<qemu-trivial@nongnu.org>
Subject: Re: [Qemu-trivial] [PATCH 1/1] migration: fix compiler warning on uninitialized variable
Date: Tue, 1 Nov 2016 09:12:12 +0800	[thread overview]
Message-ID: <5817EBEC.5020703@huawei.com> (raw)
In-Reply-To: <259818682e41b95ae60f1423b87954a3fe377639.1477950393.git.jcody@redhat.com>

On 2016/11/1 5:50, Jeff Cody wrote:
> Some older GCC versions (e.g. 4.4.7) report a warning on an
> uninitialized variable for 'request', even though all possible code
> paths that reference 'request' will be initialized.   To appease
> these versions, initialize the variable to 0.
>

Thanks for reporting this,  I think this patch can go through trivial
branch.

Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org

> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Jeff Cody <jcody@redhat.com>

Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>

> ---
>   migration/colo.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/colo.c b/migration/colo.c
> index e7224b8..93c85c5 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -439,7 +439,7 @@ void *colo_process_incoming_thread(void *opaque)
>       }
>
>       while (mis->state == MIGRATION_STATUS_COLO) {
> -        int request;
> +        int request = 0;
>
>           colo_wait_handle_message(mis->from_src_file, &request, &local_err);
>           if (local_err) {
>



WARNING: multiple messages have this Message-ID (diff)
From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, mark.cave-ayland@ilande.co.uk,
	quintela@redhat.com, Michael Tokarev <mjt@tls.msk.ru>,
	qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/1] migration: fix compiler warning on uninitialized variable
Date: Tue, 1 Nov 2016 09:12:12 +0800	[thread overview]
Message-ID: <5817EBEC.5020703@huawei.com> (raw)
In-Reply-To: <259818682e41b95ae60f1423b87954a3fe377639.1477950393.git.jcody@redhat.com>

On 2016/11/1 5:50, Jeff Cody wrote:
> Some older GCC versions (e.g. 4.4.7) report a warning on an
> uninitialized variable for 'request', even though all possible code
> paths that reference 'request' will be initialized.   To appease
> these versions, initialize the variable to 0.
>

Thanks for reporting this,  I think this patch can go through trivial
branch.

Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org

> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Jeff Cody <jcody@redhat.com>

Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>

> ---
>   migration/colo.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/colo.c b/migration/colo.c
> index e7224b8..93c85c5 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -439,7 +439,7 @@ void *colo_process_incoming_thread(void *opaque)
>       }
>
>       while (mis->state == MIGRATION_STATUS_COLO) {
> -        int request;
> +        int request = 0;
>
>           colo_wait_handle_message(mis->from_src_file, &request, &local_err);
>           if (local_err) {
>

  reply	other threads:[~2016-11-01  1:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 21:50 [Qemu-devel] [PATCH 1/1] migration: fix compiler warning on uninitialized variable Jeff Cody
2016-11-01  1:12 ` Hailiang Zhang [this message]
2016-11-01  1:12   ` Hailiang Zhang
2016-11-01 10:20 ` Peter Maydell
2016-11-02  7:30 ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5817EBEC.5020703@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=jcody@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.