From 3e45d68b7088df39d0520d1a92005cfdf4e2b922 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 22 Oct 2015 09:46:29 -0400 Subject: [PATCH] rs6000: Add cast for int to enum conversion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes this error: /home/pedro/gdb/mygit/src/gdb/rs6000-tdep.c:3091:1: error: invalid conversion from ‘int’ to ‘bfd_architecture’ [-fpermissive] }; ^ /home/pedro/gdb/mygit/src/gdb/rs6000-tdep.c: In function ‘void powerpc_set_vector_abi(char*, int, cmd_list_element*)’: /home/pedro/gdb/mygit/src/gdb/rs6000-tdep.c:6063:28: error: invalid conversion from ‘int’ to ‘powerpc_vector_abi’ [-fpermissive] powerpc_vector_abi_global = vector_abi; ^ gdb/ChangeLog: * rs6000-tdep.c (variants): Add (enum bfd_architecture) cast. --- gdb/ChangeLog | 4 ++++ gdb/rs6000-tdep.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5ac983f6479..9c8ae4c7fc0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-22 Simon Marchi + + * rs6000-tdep.c (variants): Add (enum bfd_architecture) cast. + 2015-10-22 Simon Marchi * mips-linux-tdep.c (mips64_linux_get_longjmp_target): Change type of diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index baf6b67d096..589b996072e 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3144,7 +3144,7 @@ static struct variant variants[] = {"rs2", "IBM POWER RS2", bfd_arch_rs6000, bfd_mach_rs6k_rs2, &tdesc_rs6000}, - {0, 0, 0, 0, 0} + {0, 0, (enum bfd_architecture) 0, 0, 0} }; /* Return the variant corresponding to architecture ARCH and machine number -- 2.30.2