qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 06/18] COLO: Introduce checkpointing protocol


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PULL 06/18] COLO: Introduce checkpointing protocol
Date: Mon, 31 Oct 2016 16:25:07 -0200
User-agent: Mutt/1.7.0 (2016-08-17)

On Sun, Oct 30, 2016 at 04:16:58PM +0530, Amit Shah wrote:
[...]
> +static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_request,
> +                                     Error **errp)
> +{
> +    COLOMessage msg;
> +    Error *local_err = NULL;
> +
> +    msg = colo_receive_message(f, &local_err);
> +    if (local_err) {
> +        error_propagate(errp, local_err);
> +        return;
> +    }
> +
> +    switch (msg) {
> +    case COLO_MESSAGE_CHECKPOINT_REQUEST:
> +        *checkpoint_request = 1;
> +        break;
> +    default:
> +        *checkpoint_request = 0;
> +        error_setg(errp, "Got unknown COLO message: %d", msg);
> +        break;
> +    }
> +}
[...]
> +        colo_wait_handle_message(mis->from_src_file, &request, &local_err);
> +        if (local_err) {
> +            goto out;
> +        }
> +        assert(request);

GCC 4.8.5 doesn't seem to be smart enough to notice that request
will be always initialized:

  /root/qemu/migration/colo.c: In function ‘colo_process_incoming_thread’:
  /root/qemu/migration/colo.c:448:33: error: ‘request’ may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
           assert(request);
                                   ^
  cc1: all warnings being treated as errors

  $ gcc --version
  gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]