From patchwork Thu Apr 1 18:03:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 49233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7D660B7D08 for ; Fri, 2 Apr 2010 05:47:42 +1100 (EST) Received: from localhost ([127.0.0.1]:56681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxOqk-0007Cq-CB for incoming@patchwork.ozlabs.org; Thu, 01 Apr 2010 14:10:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxOjy-0005If-Uy for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:03:39 -0400 Received: from [140.186.70.92] (port=54445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxOjx-0005IN-Gt for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:03:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxOjv-0005mJ-P0 for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:03:37 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:50713) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxOjv-0005m6-EJ for qemu-devel@nongnu.org; Thu, 01 Apr 2010 14:03:35 -0400 Received: from flocke.weilnetz.de (p54ADFAC7.dip.t-dialin.net [84.173.250.199]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MDn2s-1Nlqo629wU-00GhV9; Thu, 01 Apr 2010 20:03:32 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1NxOjr-0004o8-KR; Thu, 01 Apr 2010 20:03:31 +0200 From: Stefan Weil To: QEMU Developers Date: Thu, 1 Apr 2010 20:03:30 +0200 Message-Id: <1270145010-18452-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.0 MIME-Version: 1.0 X-Provags-ID: V01U2FsdGVkX19nK7AylCHFcgHZMqBnjGaHrVFaADV8/5cAdrD rfOVhCl9lkvnSyNggxp1F09RsdNokMJZSa1wjE2EQWrNzC95Ml Z6BYlZcZWXdoV+9vSitKQXb9nZKD3dJwHJJZPxPspyV3pJhdiS gUQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] target-i386: Fix compiler warning X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org With argument checking for cpu_fprintf, gcc throws this warning: CC i386-softmmu/helper.o cc1: warnings being treated as errors /qemu/ar7/target-i386/helper.c: In function ‘cpu_x86_dump_seg_cache’: /qemu/ar7/target-i386/helper.c:220: error: format not a string literal and no format arguments The code is correct, but current gcc versions don't detect this. Therefore the patch rewrites the statement to satisfy the compiler. Signed-off-by: Stefan Weil --- target-i386/helper.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index 136ca8d..67c1224 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -214,9 +214,10 @@ cpu_x86_dump_seg_cache(CPUState *env, FILE *f, "Reserved", "IntGate64", "TrapGate64" } }; - cpu_fprintf(f, sys_type_name[(env->hflags & HF_LMA_MASK) ? 1 : 0] - [(sc->flags & DESC_TYPE_MASK) - >> DESC_TYPE_SHIFT]); + cpu_fprintf(f, "%s", + sys_type_name[(env->hflags & HF_LMA_MASK) ? 1 : 0] + [(sc->flags & DESC_TYPE_MASK) + >> DESC_TYPE_SHIFT]); } done: cpu_fprintf(f, "\n");