From patchwork Tue Nov 10 12:18:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 56298 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp734449lbb; Tue, 10 Nov 2015 04:18:57 -0800 (PST) X-Received: by 10.140.22.175 with SMTP id 44mr3635038qgn.29.1447157937495; Tue, 10 Nov 2015 04:18:57 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c137si421917qhc.4.2015.11.10.04.18.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 10 Nov 2015 04:18:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dkim=fail header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([::1]:59202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7t3-0002cp-6Y for patch@linaro.org; Tue, 10 Nov 2015 07:18:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7sd-0002KQ-NT for qemu-devel@nongnu.org; Tue, 10 Nov 2015 07:18:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw7sY-0005TO-2Q for qemu-devel@nongnu.org; Tue, 10 Nov 2015 07:18:31 -0500 Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:32779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7sX-0005TH-Uu for qemu-devel@nongnu.org; Tue, 10 Nov 2015 07:18:26 -0500 Received: by obbww6 with SMTP id ww6so136312853obb.0 for ; Tue, 10 Nov 2015 04:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=DYBdR8myY1h4V5iT2azqfSqCenmZjWu/MzA17vlgG7A=; b=R8jEfOkHcpCl4BUUH+4y94tLcZKNZtT10JKQh4qLdVw+05uAFB5TQfdqfCqTiDZO7m EQ6e8sPgH0BK9VkdgyXrI4N5k9a5CXRZku8atufWiGrhR49XK7uug5cLcdkx70sfCvBR E6A0QviclkILyY/RYqViFdE7hGHXzLP7ImMz+d1UcrXXoOSuLSwo+hts+0eKl3LIIsnR 7q2rp0yRMn+BBW3u4c+XAZxgiva/Q5MPQyCx+0fyjw8jzaTkdwjy3w/OYLaWmdpgXnk1 oYf3pNBhcgkqRkR+IyV3utfA+qm4xY5VoIvfbmJqQuzmzOFe9/TuDAV4Blv/q7t9EskE rW2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=DYBdR8myY1h4V5iT2azqfSqCenmZjWu/MzA17vlgG7A=; b=AChXShcfdzdMoe18y30YAm4EonUhDBYOdeAuXjj8lfTyAJvFj/C9S0+w7XckulorBO pjrIkkBlMtIQ5b1cSuoGFHOUmK83CbZFkTUAWwghu6yufGiDXrcZjPVlrbc6LcoieJf+ 3lF8jkPpbKJzukWnR3B4RUKpJdHRzpj/GvrCRpjnAa4KmCrbB/yjzOOw0v/WgEgEOv8z 8sKe2K8PltvwOuej0Ih41DT08zWUw81VpaV80Rk9/Dd0Eas/Al6waVG12xIXAWDeiAGy yTRjJlB5dt6sEoeFFpKyMghQjrffemTuo1Nogt3l8VXzLZ5gXvTimpnCdhDETLjfQaUY BEYQ== X-Gm-Message-State: ALoCoQmY9nqRGcqvRQzusPD1zfaQGOEbrCgeMy8mtzFqGrxoMaD5r1jMoGY8S/tpJ9+pB4jXxmGe X-Received: by 10.60.128.229 with SMTP id nr5mr1335951oeb.11.1447157905198; Tue, 10 Nov 2015 04:18:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.72.68 with HTTP; Tue, 10 Nov 2015 04:18:05 -0800 (PST) In-Reply-To: References: <1447090141-29074-1-git-send-email-quintela@redhat.com> <87ziyn81s1.fsf@emacs.mitica> <56411FDA.2050401@redhat.com> From: Peter Maydell Date: Tue, 10 Nov 2015 12:18:05 +0000 Message-ID: To: Eric Blake X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::234 Cc: Amit Shah , QEMU Developers , "Dr. David Alan Gilbert" , Juan Quintela Subject: Re: [Qemu-devel] [PULL 00/57] Migration pull X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 thanks -- PMM 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; }