This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Committed: fix sim/cr16/interp.c hash prototype
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gdb-patches at sourceware dot org
- Cc: MR dot Swami dot Reddy at nsc dot com
- Date: Fri, 11 Jul 2008 03:35:27 +0200
- Subject: Committed: fix sim/cr16/interp.c hash prototype
While cleaning up the recently introduced -lz mess in sim, I
found that the cr16 sim didn't compile for me (gcc-4.0.2-8.fc4):
gcc -c -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -DNEED_UI_LOOP_HOOK -DSIM_HAVE_ENVIRONMENT -I. -I/home/hp/combined/sim_write/src/sim/cr16 -I../common -I/home/hp/combined/sim_write/src/sim/cr16/../common -I../../include -I/home/hp/combined/sim_write/src/sim/cr16/../../include -I../../bfd -I/home/hp/combined/sim_write/src/sim/cr16/../../bfd -I../../opcodes -I/home/hp/combined/sim_write/src/sim/cr16/../../opcodes -g -O2 /home/hp/combined/sim_write/src/sim/cr16/interp.c
x/src/sim/cr16/interp.c:96: error: conflicting types for `hash'
x/src/sim/cr16/interp.c:53: error: previous declaration of `hash' here
x/src/sim/cr16/interp.c: In function `do_run':
x/src/sim/cr16/interp.c:400: warning: comparison between pointer and integer
make[3]: *** [interp.o] Error 1
As the prototype isn't required, I fixed it thus, committed:
sim/cr16:
* interp.c (hash): Remove incorrect prototype.
Index: interp.c
===================================================================
RCS file: /cvs/src/src/sim/cr16/interp.c,v
retrieving revision 1.2
diff -p -u -r1.2 interp.c
--- interp.c 5 May 2008 09:19:42 -0000 1.2
+++ interp.c 11 Jul 2008 01:29:02 -0000
@@ -50,7 +50,6 @@ asection *text;
bfd_vma text_start;
bfd_vma text_end;
-static long hash PARAMS ((uint64 linsn, int));
static struct hash_entry *lookup_hash PARAMS ((uint64 ins, int size));
static void get_operands PARAMS ((operand_desc *s, uint64 mcode, int isize, int nops));
static int do_run PARAMS ((uint64 mc));
brgds, H-P