From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7wo-0003dj-Bd for qemu-devel@nongnu.org; Tue, 10 Nov 2015 07:22:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw7wj-0006PU-Ct for qemu-devel@nongnu.org; Tue, 10 Nov 2015 07:22:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7wj-0006PH-5R for qemu-devel@nongnu.org; Tue, 10 Nov 2015 07:22:45 -0500 Date: Tue, 10 Nov 2015 12:22:40 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20151110122240.GA3162@work-vm> References: <1447090141-29074-1-git-send-email-quintela@redhat.com> <87ziyn81s1.fsf@emacs.mitica> <56411FDA.2050401@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PULL 00/57] Migration pull List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Amit Shah , QEMU Developers , Juan Quintela * Peter Maydell (peter.maydell@linaro.org) wrote: > On 10 November 2015 at 10:53, Peter Maydell wrote: > > On 9 November 2015 at 22:36, Eric Blake wrote: > >> The only POSIX-ly correct portable way to print ssize_t is via casts > >> (yes, quite ugly), as in: > >> > >> printf("%zu", (size_t)(ssize_t_value)); > > > > I'm running a test build using this approach. > > The following fixup patch was sufficient to get the pull through > my tests. > > Signed-off-by: Peter Maydell OK, it's just error messages anyway (we'll probably get afew odd big values in there in the -ve cases). Reviewed-by: Dr. David Alan Gilbert Is this OK or are you expecting Juan to send you a new pull? Dave > diff --git a/migration/migration.c b/migration/migration.c > index 58eb099..c5c977e 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -1284,9 +1284,9 @@ static void *source_return_path_thread(void *opaque) > header_len != rp_cmd_args[header_type].len) || > header_len > max_len) { > error_report("RP: Received '%s' message (0x%04x) with" > - "incorrect length %d expecting %zd", > + "incorrect length %d expecting %zu", > rp_cmd_args[header_type].name, header_type, header_len, > - rp_cmd_args[header_type].len); > + (size_t)rp_cmd_args[header_type].len); > mark_source_rp_bad(ms); > goto out; > } > diff --git a/migration/qemu-file-unix.c b/migration/qemu-file-unix.c > index 7ccdf69..c503b02 100644 > --- a/migration/qemu-file-unix.c > +++ b/migration/qemu-file-unix.c > @@ -55,8 +55,8 @@ static ssize_t socket_writev_buffer(void *opaque, > struct iovec *iov, int iovcnt, > err = socket_error(); > > if (err != EAGAIN && err != EWOULDBLOCK) { > - error_report("socket_writev_buffer: Got err=%d for (%zd/%zd)", > - err, size, len); > + error_report("socket_writev_buffer: Got err=%d for (%zu/%zu)", > + err, (size_t)size, (size_t)len); > /* > * If I've already sent some but only just got the error, I > * could return the amount validly sent so far and wait for the > diff --git a/migration/savevm.c b/migration/savevm.c > index fad34b8..be52314 100644 > --- a/migration/savevm.c > +++ b/migration/savevm.c > @@ -1602,8 +1602,9 @@ static int loadvm_process_command(QEMUFile *f) > } > > if (mig_cmd_args[cmd].len != -1 && mig_cmd_args[cmd].len != len) { > - error_report("%s received with bad length - expecting %zd, got %d", > - mig_cmd_args[cmd].name, mig_cmd_args[cmd].len, len); > + error_report("%s received with bad length - expecting %zu, got %d", > + mig_cmd_args[cmd].name, > + (size_t)mig_cmd_args[cmd].len, len); > return -ERANGE; > } > > thanks > -- PMM -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK