From patchwork Sat Oct 5 09:19:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 280761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 385D52C0077 for ; Sat, 5 Oct 2013 19:19:52 +1000 (EST) Received: from localhost ([::1]:51268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSO1e-0003P9-1M for incoming@patchwork.ozlabs.org; Sat, 05 Oct 2013 05:19:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSO1M-0003P3-1j for qemu-devel@nongnu.org; Sat, 05 Oct 2013 05:19:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSO1H-0004Qg-6B for qemu-devel@nongnu.org; Sat, 05 Oct 2013 05:19:31 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:57478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSO1G-0004Qa-UG; Sat, 05 Oct 2013 05:19:27 -0400 Received: from [192.168.88.2] (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 4BC8840AC6; Sat, 5 Oct 2013 13:19:26 +0400 (MSK) Message-ID: <524FD99E.8020205@msgid.tls.msk.ru> Date: Sat, 05 Oct 2013 13:19:26 +0400 From: Michael Tokarev Organization: Telecom Service, JSC User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130922 Icedove/17.0.9 MIME-Version: 1.0 To: Paolo Bonzini References: <1380469272-19230-1-git-send-email-sw@weilnetz.de> <52488A00.6000405@msgid.tls.msk.ru> <52488E98.3060505@weilnetz.de> <871u46iq96.fsf@blackfin.pond.sub.org> <5249E4CD.1050605@weilnetz.de> <524C6DD0.9070605@msgid.tls.msk.ru> <524C80ED.3020507@weilnetz.de> <524D2745.8060906@redhat.com> <524FD8B2.9090201@msgid.tls.msk.ru> In-Reply-To: <524FD8B2.9090201@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial , Stefan Weil , Markus Armbruster , qemu-devel Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] migration: Fix compiler warning ('caps' may be used uninitialized) 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 05.10.2013 13:15, Michael Tokarev пишет: > Okay. This takes just too long and too many people > are affected. I'll just set the variable in question > (caps) to NULL at entry for now, -- it is not a critical > path and the current code is correct anyway. This is > becoming ridiculous, when there are so many different > opinions about such a trivial thing, with the result > being that nothing is fixed. Setting it to NULL at > least will let a buildbot to be fixed for now. Forgot the patch itself. It is the shortest from all already proposed ;) Author: Michael Tokarev Date: Sat Oct 5 13:18:28 2013 +0400 migration: Fix compiler warning ('caps' may be used uninitialized) Signed-off-by: Michael Tokarev Thanks, /mjt Reviewed-by: Stefan Weil diff --git a/migration.c b/migration.c index b4f8462..2b1ab20 100644 --- a/migration.c +++ b/migration.c @@ -150,6 +150,7 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilitie MigrationState *s = migrate_get_current(); int i; + caps = NULL; /* silence compiler warning */ for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) { if (head == NULL) { head = g_malloc0(sizeof(*caps));