From patchwork Thu Jan 15 08:30:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 429282 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DB6B91401DA for ; Thu, 15 Jan 2015 19:42:00 +1100 (AEDT) Received: from localhost ([::1]:49563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBg06-0002GN-GX for incoming@patchwork.ozlabs.org; Thu, 15 Jan 2015 03:41:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBfxH-0005nl-Uz for qemu-devel@nongnu.org; Thu, 15 Jan 2015 03:39:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBfx9-0002FV-59 for qemu-devel@nongnu.org; Thu, 15 Jan 2015 03:39:03 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:46059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBfx8-0002EO-U0; Thu, 15 Jan 2015 03:38:55 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 12BB040DB6; Thu, 15 Jan 2015 11:38:54 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 2CC0F8CC; Thu, 15 Jan 2015 11:30:54 +0300 (MSK) Received: (nullmailer pid 31345 invoked by uid 1000); Thu, 15 Jan 2015 08:30:51 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Thu, 15 Jan 2015 11:30:41 +0300 Message-Id: <2d8ac5eb7a7e72e0877cca2b3705eebeaf5526e7.1421310394.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev , SeokYeon Hwang Subject: [Qemu-devel] [PULL 03/12] translate-all: Mark map_exec() with the 'unused' attribute 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 From: SeokYeon Hwang Mark map_exec() with the 'unused' attribute to avoid '-Wunused-function' warnings on clang 3.4 or later. This means we don't need to mark it 'inline', which is what we were previously using to suppress the warning (a trick which only works with gcc, not clang). Signed-off-by: SeokYeon Hwang Reviewed-by: Paolo Bonzini [PMM: tweaked comment message a little] Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- translate-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translate-all.c b/translate-all.c index 8fa4378..687ba7d 100644 --- a/translate-all.c +++ b/translate-all.c @@ -276,14 +276,14 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr) } #ifdef _WIN32 -static inline void map_exec(void *addr, long size) +static __attribute__((unused)) void map_exec(void *addr, long size) { DWORD old_protect; VirtualProtect(addr, size, PAGE_EXECUTE_READWRITE, &old_protect); } #else -static inline void map_exec(void *addr, long size) +static __attribute__((unused)) void map_exec(void *addr, long size) { unsigned long start, end, page_size;