Received: from eggs.gnu.org ([2001:4830:134:3::10]:54748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQkTQ-0000Ia-CU for qemu-devel@nongnu.org; Mon, 30 Sep 2013 16:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQkTK-0006eC-C8 for qemu-devel@nongnu.org; Mon, 30 Sep 2013 16:53:44 -0400 Message-ID: <5249E4CD.1050605@weilnetz.de> Date: Mon, 30 Sep 2013 22:53:33 +0200 From: Stefan Weil MIME-Version: 1.0 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> In-Reply-To: <871u46iq96.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] migration: Fix compiler warning ('caps' may be used uninitialized) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-trivial , Michael Tokarev , qemu-devel Am 30.09.2013 11:59, schrieb Markus Armbruster: > Stefan Weil writes: >> Am 29.09.2013 22:13, schrieb Michael Tokarev: >>> 29.09.2013 19:41, Stefan Weil wrote: >>>> The QEMU buildbot default_i386_debian_6_0 shows this warning: >>>> >>>> CC migration.o >>>> migration.c: In function 'qmp_query_migrate_capabilities': >>>> migration.c:149: warning: >>>> 'caps' may be used uninitialized in this function >>> Gah, how disgusting. The code is correct, yet gcc complains >>> needlessly... >> That's not the first time where we help the compiler by modifying the code. > It's also not the first time where attempting to "help" the compiler > made code less readable, or even less correct. So let's be just as > careful as with "real" changes. Well, I try to do my best. ;-) Is there anything wrong with my patch? I think the code looks cleaner than before. If there is a better way to fix the problem that's fine, too. The problem withthe buildbot showing a compiler warning exists and we should fix it somehow. Regards, Stefan