From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VttbE-0003NJ-KN for qemu-devel@nongnu.org; Fri, 20 Dec 2013 01:30:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vttb5-0005XD-LW for qemu-devel@nongnu.org; Fri, 20 Dec 2013 01:30:16 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:53597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vttb2-0005Kl-LN for qemu-devel@nongnu.org; Fri, 20 Dec 2013 01:30:07 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Dec 2013 16:29:56 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 0A2CD2CE802D for ; Fri, 20 Dec 2013 17:29:55 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rBK6BLK553739730 for ; Fri, 20 Dec 2013 17:11:22 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rBK6TqeZ025231 for ; Fri, 20 Dec 2013 17:29:53 +1100 From: Mike Qiu Date: Fri, 20 Dec 2013 01:29:50 -0500 Message-Id: <1387520990-3228-1-git-send-email-qiudayu@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] vl: Fix compile issue with Werror option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mike Qiu , aliguori@amazon.com Currently, if compile with Werror option, the error message shows below: GEN config-host.h GEN trace/generated-tracers.h CHK version_gen.h GEN trace/generated-tracers.c CC vl.o vl.c: In function ‘get_boot_devices_list’: vl.c:1257:21: error: ‘bootpath’ may be used uninitialized in this function [-Werror=maybe-uninitialized] len = strlen(bootpath) + 1; ^ cc1: all warnings being treated as errors make: *** [vl.o] Error 1 This patch is to solve this issue. Signed-off-by: Mike Qiu --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index b97728f..d67b284 100644 --- a/vl.c +++ b/vl.c @@ -1230,7 +1230,7 @@ char *get_boot_devices_list(size_t *size, bool ignore_suffixes) char *list = NULL; QTAILQ_FOREACH(i, &fw_boot_order, link) { - char *devpath = NULL, *bootpath; + char *devpath = NULL, *bootpath = NULL; size_t len; if (i->dev) { -- 1.8.2.1