From patchwork Sat Jun 7 17:08:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 357119 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 225D0140091 for ; Sun, 8 Jun 2014 03:09:07 +1000 (EST) Received: from localhost ([::1]:52486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtK77-0002VN-08 for incoming@patchwork.ozlabs.org; Sat, 07 Jun 2014 13:09:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtK6p-0002B8-Ep for qemu-devel@nongnu.org; Sat, 07 Jun 2014 13:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtK6o-0006wV-Ep for qemu-devel@nongnu.org; Sat, 07 Jun 2014 13:08:47 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtK6o-0006wE-6x; Sat, 07 Jun 2014 13:08:46 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WtK6m-0003gj-5w; Sat, 07 Jun 2014 18:08:44 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Sat, 7 Jun 2014 18:08:44 +0100 Message-Id: <1402160924-14152-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: qemu-trivial@nongnu.org, Richard Henderson , patches@linaro.org Subject: [Qemu-devel] [PATCH] tcg: mark tcg_out* and tcg_patch* with attribute 'unused' 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 The tcg_out* and tcg_patch* functions are utility routines that may or may not be used by a particular backend; mark them with the 'unused' attribute to suppress spurious warnings if they aren't used. Signed-off-by: Peter Maydell --- Do we want to define a QEMU_UNUSED macro in compiler.h? We don't seem to have done for the existing uses of this attribute in tree. tcg/tcg.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 2c5732d..fe55d05 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -125,19 +125,20 @@ static TCGRegSet tcg_target_available_regs[2]; static TCGRegSet tcg_target_call_clobber_regs; #if TCG_TARGET_INSN_UNIT_SIZE == 1 -static inline void tcg_out8(TCGContext *s, uint8_t v) +static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v) { *s->code_ptr++ = v; } -static inline void tcg_patch8(tcg_insn_unit *p, uint8_t v) +static __attribute__((unused)) inline void tcg_patch8(tcg_insn_unit *p, + uint8_t v) { *p = v; } #endif #if TCG_TARGET_INSN_UNIT_SIZE <= 2 -static inline void tcg_out16(TCGContext *s, uint16_t v) +static __attribute__((unused)) inline void tcg_out16(TCGContext *s, uint16_t v) { if (TCG_TARGET_INSN_UNIT_SIZE == 2) { *s->code_ptr++ = v; @@ -148,7 +149,8 @@ static inline void tcg_out16(TCGContext *s, uint16_t v) } } -static inline void tcg_patch16(tcg_insn_unit *p, uint16_t v) +static __attribute__((unused)) inline void tcg_patch16(tcg_insn_unit *p, + uint16_t v) { if (TCG_TARGET_INSN_UNIT_SIZE == 2) { *p = v; @@ -159,7 +161,7 @@ static inline void tcg_patch16(tcg_insn_unit *p, uint16_t v) #endif #if TCG_TARGET_INSN_UNIT_SIZE <= 4 -static inline void tcg_out32(TCGContext *s, uint32_t v) +static __attribute__((unused)) inline void tcg_out32(TCGContext *s, uint32_t v) { if (TCG_TARGET_INSN_UNIT_SIZE == 4) { *s->code_ptr++ = v; @@ -170,7 +172,8 @@ static inline void tcg_out32(TCGContext *s, uint32_t v) } } -static inline void tcg_patch32(tcg_insn_unit *p, uint32_t v) +static __attribute__((unused)) inline void tcg_patch32(tcg_insn_unit *p, + uint32_t v) { if (TCG_TARGET_INSN_UNIT_SIZE == 4) { *p = v; @@ -181,7 +184,7 @@ static inline void tcg_patch32(tcg_insn_unit *p, uint32_t v) #endif #if TCG_TARGET_INSN_UNIT_SIZE <= 8 -static inline void tcg_out64(TCGContext *s, uint64_t v) +static __attribute__((unused)) inline void tcg_out64(TCGContext *s, uint64_t v) { if (TCG_TARGET_INSN_UNIT_SIZE == 8) { *s->code_ptr++ = v; @@ -192,7 +195,8 @@ static inline void tcg_out64(TCGContext *s, uint64_t v) } } -static inline void tcg_patch64(tcg_insn_unit *p, uint64_t v) +static __attribute__((unused)) inline void tcg_patch64(tcg_insn_unit *p, + uint64_t v) { if (TCG_TARGET_INSN_UNIT_SIZE == 8) { *p = v;