This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob] Random cleanups
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 17 Jan 2004 22:46:24 -0500
- Subject: [ob] Random cleanups
- convert some macro's to enums
- use the correct type for a scratch variable - the values being
compared were CORE_ADDRS
committed,
ANdrew
2004-01-17 Andrew Cagney <cagney@redhat.com>
* mdebugread.c (compare_blocks): Make addr_diff a LONGEST.
* block.h: Make GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOOCK
enums.
Index: block.h
===================================================================
RCS file: /cvs/src/src/gdb/block.h,v
retrieving revision 1.9
diff -u -r1.9 block.h
--- block.h 11 Sep 2003 19:49:17 -0000 1.9
+++ block.h 18 Jan 2004 02:54:51 -0000
@@ -139,9 +139,7 @@
/* Special block numbers */
-#define GLOBAL_BLOCK 0
-#define STATIC_BLOCK 1
-#define FIRST_LOCAL_BLOCK 2
+enum { GLOBAL_BLOCK = 0, STATIC_BLOCK = 1, FIRST_LOCAL_BLOCK = 2 };
extern struct symbol *block_function (const struct block *);
Index: mdebugread.c
===================================================================
RCS file: /cvs/src/src/gdb/mdebugread.c,v
retrieving revision 1.55
diff -u -r1.55 mdebugread.c
--- mdebugread.c 18 Jan 2004 01:22:57 -0000 1.55
+++ mdebugread.c 18 Jan 2004 02:55:27 -0000
@@ -4509,7 +4509,7 @@
static int
compare_blocks (const void *arg1, const void *arg2)
{
- int addr_diff;
+ LONGEST addr_diff;
struct block **b1 = (struct block **) arg1;
struct block **b2 = (struct block **) arg2;