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