[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused'
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused' |
Date: |
Sun, 10 Jan 2021 17:27:38 +0100 |
The tcg_out* functions are utility routines that may or
may not be used by a particular backend. Similarly to commit
4196dca63b8, mark them with the 'unused' attribute to suppress
spurious warnings if they aren't used.
This fixes the build with --enable-tcg-interpreter:
[98/151] Compiling C object libqemu-arm-softmmu.fa.p/tcg_tcg.c.o
FAILED: libqemu-arm-softmmu.fa.p/tcg_tcg.c.o
clang [...] -o libqemu-arm-softmmu.fa.p/tcg_tcg.c.o -c ../tcg/tcg.c
../tcg/tcg.c:136:20: error: unused function 'tcg_out_dupi_vec'
[-Werror,-Wunused-function]
Reported-by: Wataru Ashihara <wataash@wataash.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tcg/tcg.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 472bf1755bf..a7fc2043cbf 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -123,24 +123,36 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
unsigned vecl,
unsigned vece, const TCGArg *args,
const int *const_args);
#else
-static inline bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece,
- TCGReg dst, TCGReg src)
+static __attribute__((unused)) inline bool tcg_out_dup_vec(TCGContext *s,
+ TCGType type,
+ unsigned vece,
+ TCGReg dst,
+ TCGReg src)
{
g_assert_not_reached();
}
-static inline bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece,
- TCGReg dst, TCGReg base, intptr_t offset)
+static __attribute__((unused)) inline bool tcg_out_dupm_vec(TCGContext *s,
+ TCGType type,
+ unsigned vece,
+ TCGReg dst,
+ TCGReg base,
+ intptr_t offset)
{
g_assert_not_reached();
}
-static inline void tcg_out_dupi_vec(TCGContext *s, TCGType type,
- TCGReg dst, tcg_target_long arg)
+static __attribute__((unused)) inline void tcg_out_dupi_vec(TCGContext *s,
+ TCGType type,
+ TCGReg dst,
+ tcg_target_long
arg)
{
g_assert_not_reached();
}
-static inline void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, unsigned vecl,
- unsigned vece, const TCGArg *args,
- const int *const_args)
+static __attribute__((unused)) inline void tcg_out_vec_op(TCGContext *s,
+ TCGOpcode opc,
+ unsigned vecl,
+ unsigned vece,
+ const TCGArg *args,
+ const int
*const_args)
{
g_assert_not_reached();
}
--
2.26.2
- [PATCH 0/2] tcg/tci: Fix Clang build, Philippe Mathieu-Daudé, 2021/01/10
- [PATCH 1/2] tcg: Mark more tcg_out*() functions with attribute 'unused',
Philippe Mathieu-Daudé <=
- [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/10
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Thomas Huth, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Daniel P . Berrangé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Daniel P . Berrangé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Daniel P . Berrangé, 2021/01/21
- Re: [RFC PATCH 2/2] gitlab-ci: Add a job building TCI with Clang, Philippe Mathieu-Daudé, 2021/01/21