aboutsummaryrefslogtreecommitdiff
path: root/binutils/coffgrok.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-01-18 17:27:52 +0000
committerIan Lance Taylor <ian@airs.com>1995-01-18 17:27:52 +0000
commit958998b7aacbe2a7da7928add10a20e0b0e7424f (patch)
tree6646de0b24f8ae1db1e618f878da9918e3388e26 /binutils/coffgrok.c
parent96d1566d78376216122164d909f4c9a8c20cb638 (diff)
downloadgdb-958998b7aacbe2a7da7928add10a20e0b0e7424f.zip
gdb-958998b7aacbe2a7da7928add10a20e0b0e7424f.tar.gz
gdb-958998b7aacbe2a7da7928add10a20e0b0e7424f.tar.bz2
gcc -Wall lint.
* coffdump.c (dump_coff_scope): Cast pointer to unsigned long for printf. * coffgrok.c: Include bucomm.h. Don't declare xmalloc. (push_scope): Declare type of parameter link. * size.c: Include libiberty.h. * srconv.c: Include bucomm.h. (find_base): Declare at top of file. (wr_hd): Add default case to architecture switch. (wr_dps_start): Declare type of parameter nest. (wr_du): Comment out variables used only in commented out blocks. (wr_dus): Remove unused variable i. (wr_sc): Remove unused variables myinfo, low, and high. * strings.c: Include libiberty.h. * sysdump.c: Include <ctype.h>.
Diffstat (limited to 'binutils/coffgrok.c')
-rw-r--r--binutils/coffgrok.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/binutils/coffgrok.c b/binutils/coffgrok.c
index 35ccd99d..b202a0e 100644
--- a/binutils/coffgrok.c
+++ b/binutils/coffgrok.c
@@ -30,6 +30,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <bfd.h>
#include <stdio.h>
+#include "bucomm.h"
#include "coff/internal.h"
#include "../bfd/libcoff.h"
@@ -57,7 +58,6 @@ static struct coff_ptr_struct *rawsyms;
static int rawcount;
static bfd *abfd;
extern char *xcalloc ();
-extern char *xmalloc ();
#define PTR_SIZE 4
#define SHORT_SIZE 2
#define INT_SIZE 4
@@ -84,6 +84,7 @@ empty_symbol ()
/*int l;*/
static void
push_scope (link)
+ int link;
{
struct coff_scope *n = empty_scope ();
if (link)
@@ -371,6 +372,7 @@ do_type (i)
last_struct = res;
res->type = coff_structdef_type;
res->u.astructdef.elements = empty_scope ();
+ res->u.astructdef.idx = 0;
res->u.astructdef.isstruct = (type & 0xf) == T_STRUCT;
res->size = aux->x_sym.x_misc.x_lnsz.x_size;
}
@@ -585,11 +587,14 @@ doit ()
{
int i;
int infile = 0;
- struct coff_ofile *head = (struct coff_ofile *) malloc (sizeof (struct coff_ofile));
+ struct coff_ofile *head =
+ (struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
ofile = head;
head->source_head = 0;
head->source_tail = 0;
-
+ head->nsources = 0;
+ head->symbol_list_tail = 0;
+ head->symbol_list_head = 0;
do_sections_p1 (head);
push_scope (1);
@@ -723,6 +728,6 @@ coff_grok (inabfd)
rawcount = obj_raw_syment_count (abfd);;
tindex = (struct coff_symbol **) (xcalloc (sizeof (struct coff_symbol *), rawcount));
- p = doit (abfd);
+ p = doit ();
return p;
}