[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 08/14] tcg: mark tcg_out* and tcg_patch* with attri
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 08/14] tcg: mark tcg_out* and tcg_patch* with attribute 'unused' |
Date: |
Tue, 24 Jun 2014 20:09:14 +0400 |
From: Peter Maydell <address@hidden>
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 <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
tcg/tcg.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 815eec1..c068990 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -124,19 +124,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;
@@ -147,7 +148,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;
@@ -158,7 +160,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;
@@ -169,7 +171,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;
@@ -180,7 +183,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;
@@ -191,7 +194,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;
--
1.7.10.4
- [Qemu-trivial] [PULL 00/14] Trivial patches for 2014-06-24, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 06/14] block.c: Remove useless 'buf' variable, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 02/14] Fix new typos (found by codespell), Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 01/14] virtio-serial: remove useless set_config function, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 07/14] rng-random: NULL check not needed before g_free(), Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 03/14] configure: Enable TPM by default, add --disable-tpm, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 14/14] Add support for the arm breakpoint syscall, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 12/14] target-s390x: Remove unused ld_code6() function, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 08/14] tcg: mark tcg_out* and tcg_patch* with attribute 'unused',
Michael Tokarev <=
- [Qemu-trivial] [PULL 13/14] Increase maximum number of session of the internal TFTP server., Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 10/14] target-unicore: Remove unused functions, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 05/14] vscclient: Add required headers to fix build on FreeBSD, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 09/14] build-sys: introduce install-prog macro to install&strip binaries and use it, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 04/14] target-ppc: Fix compiler warning, Michael Tokarev, 2014/06/24
- [Qemu-trivial] [PULL 11/14] hw/moxie/moxiesim.c: Remove unused moxie_intc_create(), Michael Tokarev, 2014/06/24
- Re: [Qemu-trivial] [Qemu-devel] [PULL 00/14] Trivial patches for 2014-06-24, Peter Maydell, 2014/06/24