Re: [PATCH] GDB/opcodes: Remove arch/mach/endian disassembler assertions

Maciej W. Rozycki
2017-08-07T15:15:58Z

On Mon, 7 Aug 2017, H.J. Lu wrote:

> I am checking in:
>
> diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
> index 0058354265..11206c67a5 100644
> --- a/opcodes/disassemble.c
> +++ b/opcodes/disassemble.c
> @@ -110,7 +110,9 @@
> #endif
>
> disassembler_ftype
> -disassembler (enum bfd_architecture a, bfd_boolean big, unsigned long mach,
> +disassembler (enum bfd_architecture a,
> + bfd_boolean big ATTRIBUTE_UNUSED,
> + unsigned long mach ATTRIBUTE_UNUSED,
> bfd *abfd ATTRIBUTE_UNUSED)
> {
> disassembler_ftype disassemble;
>
> to fix
>
> /export/gnu/import/git/sources/binutils-gdb/opcodes/disassemble.c: In
> function ‘disassembler’:
> /export/gnu/import/git/sources/binutils-gdb/opcodes/disassemble.c:113:52:
> error: unused parameter ‘big’ [-Werror=unused-parameter]
> disassembler (enum bfd_architecture a, bfd_boolean big, unsigned long mach,
> ^~~
> /export/gnu/import/git/sources/binutils-gdb/opcodes/disassemble.c:113:71:
> error: unused parameter ‘mach’ [-Werror=unused-parameter]
> disassembler (enum bfd_architecture a, bfd_boolean big, unsigned long mach,
> ^~~~
> cc1: all warnings being treated as errors
> make[6]: *** [Makefile:1313: disassemble.lo] Error 1
>
> on x86.

Thanks, and sorry for the breakage. I only verified it with
`--enable-targets=all', but should have run full binutils testing across
my usual targets.

Maciej