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

H.J. Lu
2017-08-07T15:05:51Z

On Mon, Aug 7, 2017 at 7:56 AM, Maciej W. Rozycki <macro@imgtec.com> wrote:
> On Mon, 7 Aug 2017, Alan Modra wrote:
>
>> > gdb/
>> > * arch-utils.c (default_print_insn): Remove arch/mach/endian
>> > assertions.
>> >
>> > opcodes/
>> > * disassemble.c (disassembler): Remove arch/mach/endian
>> > assertions.
>>
>> This is OK, obvious really.
>
> Applied now, thanks for your review.
>
> Maciej

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.

--
H.J.