[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_U
Re: [Qemu-trivial] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_UNUSED
Wed, 24 Sep 2014 11:58:45 +0400
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0
18.09.2014 21:25, Tobias Klauser wrote:
> ATTRIBUTE_UNUSED is already defined in disas/bfd.h, which is included.
> Thus, there is no need to redefine it.
Is there any harm in keeping it here?
While it really is a redifinition, I'm not sure what's the right thing
here. This whole code is not from qemu, it is an external source imported,
and that source is being maintained (but under different license as has
already been discussed, so keeping changes at minimum might not be that
good idea anymore). On the other hand this symbol is so common it should
be defined in a common header. Yet on another hand, for these external
sources wich has public API, it might not be a good idea to define it in
a header to start with, because it might clash with project-local define,
so it might be better to define it in either private header or in individual
Oh well, so much for so trivial thing... ;)
> Signed-off-by: Tobias Klauser <address@hidden>
> disas/arm.c | 1 -
> 1 file changed, 1 deletion(-)
> diff --git a/disas/arm.c b/disas/arm.c
> index 76e97a8..6f63406 100644
> --- a/disas/arm.c
> +++ b/disas/arm.c
> @@ -23,7 +23,6 @@
> for things we don't care about. */
> #include "disas/bfd.h"
> -#define ATTRIBUTE_UNUSED __attribute__((unused))
> #define ISSPACE(x) ((x) == ' ' || (x) == '\t' || (x) == '\n')
> #define ARM_EXT_V1 0