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: 31526 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF9CF2100A for ; Sat, 7 Jun 2014 17:08:47 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id pa12sf20295588veb.7 for ; Sat, 07 Jun 2014 10:08:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jCNqVOYevAA/Zp36xpnzV6i/ue7PqWttQmtfBwIdcC4=; b=QVsXBx/ojRtqT/xorPvuAFWLj+/J0u19toz63WvY1NHTIrASruei1F1DIPrpbTQ7Gv 4uGTJzxm//0IdWJ5a6SiQ6i4/0gGiknGqCl3i6j5zon0ej5RCPaN0opfc1myUJO1/k8J E7AU6q7t07Zjjd9eR30YqpJUrFUjcciNoZM8cUuKOJrW8gzKL8WSr6ikPQS8tknR2ADs Ah7DGkaFOQqArjg2uEq1Al1n4oudllABUM1+hsAxzQou/DlO8mtbe0lr/VphZquwjnvr uQS4GmPMXyVHHGttTuT/nV03/p0CJUaQMGcCsngqTgakb6qRwpvOhO9dtDzdUrf4iwPX SweQ== X-Gm-Message-State: ALoCoQlXLvzET9caIwERtKKJawi3UANypec78qWL6B9Ia2BDwv4AnFA3guIoAAbBrvqVSFGsB1r9 X-Received: by 10.58.76.1 with SMTP id g1mr7978749vew.35.1402160927533; Sat, 07 Jun 2014 10:08:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.67 with SMTP id g61ls1056195qgg.12.gmail; Sat, 07 Jun 2014 10:08:47 -0700 (PDT) X-Received: by 10.52.191.97 with SMTP id gx1mr11813463vdc.55.1402160927422; Sat, 07 Jun 2014 10:08:47 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id ig3si2700403vdb.34.2014.06.07.10.08.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Jun 2014 10:08:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hy10so365363vcb.29 for ; Sat, 07 Jun 2014 10:08:47 -0700 (PDT) X-Received: by 10.220.47.201 with SMTP id o9mr12163216vcf.65.1402160927306; Sat, 07 Jun 2014 10:08:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp30103vcb; Sat, 7 Jun 2014 10:08:46 -0700 (PDT) X-Received: by 10.180.36.212 with SMTP id s20mr15185345wij.18.1402160926432; Sat, 07 Jun 2014 10:08:46 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ot5si23395766wjc.20.2014.06.07.10.08.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 07 Jun 2014 10:08:46 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; 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 Cc: patches@linaro.org, qemu-trivial@nongnu.org, Richard Henderson Subject: [PATCH] tcg: mark tcg_out* and tcg_patch* with attribute 'unused' 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;