aboutsummaryrefslogtreecommitdiff
path: root/gcc/mips-tdump.c
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>2008-09-09 16:36:14 +0000
committerRainer Orth <ro@gcc.gnu.org>2008-09-09 16:36:14 +0000
commit1f57487cf037ee3d06beab4b6dfc6a2dddb9a878 (patch)
tree7f56945272b1970151fb4c039272d8f22336a453 /gcc/mips-tdump.c
parent00efcc2b88028e7582b1090617125256e3cd7292 (diff)
downloadgcc-1f57487cf037ee3d06beab4b6dfc6a2dddb9a878.zip
gcc-1f57487cf037ee3d06beab4b6dfc6a2dddb9a878.tar.gz
gcc-1f57487cf037ee3d06beab4b6dfc6a2dddb9a878.tar.bz2
Makefile.in (mips-tfile.o-warn): Don't error out on mips-tfile.c warnings.
* Makefile.in (mips-tfile.o-warn): Don't error out on mips-tfile.c warnings. * mips-tfile.c (copy_object): Cast alloca result to int *. * mips-tdump.c (print_symbol): Cast xmalloc return values to proper types. Rename class to sclass. (read_tfile): Cast read_seek return values to proper types. Cast xcalloc return value to proper type. From-SVN: r140158
Diffstat (limited to 'gcc/mips-tdump.c')
-rw-r--r--gcc/mips-tdump.c67
1 files changed, 35 insertions, 32 deletions
diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c
index cc43e85..2164a6e 100644
--- a/gcc/mips-tdump.c
+++ b/gcc/mips-tdump.c
@@ -883,7 +883,7 @@ print_symbol (SYMR *sym_ptr, int number, const char *strbase, AUXU *aux_base,
if (want_scope)
{
if (free_scope == (scope_t *) 0)
- scope_ptr = xmalloc (sizeof (scope_t));
+ scope_ptr = (scope_t *) xmalloc (sizeof (scope_t));
else
{
scope_ptr = free_scope;
@@ -937,7 +937,7 @@ print_symbol (SYMR *sym_ptr, int number, const char *strbase, AUXU *aux_base,
if (want_scope)
{
if (free_scope == (scope_t *) 0)
- scope_ptr = xmalloc (sizeof (scope_t));
+ scope_ptr = (scope_t *) xmalloc (sizeof (scope_t));
else
{
scope_ptr = free_scope;
@@ -980,19 +980,19 @@ print_symbol (SYMR *sym_ptr, int number, const char *strbase, AUXU *aux_base,
scope_ptr != (scope_t *) 0;
scope_ptr = scope_ptr->prev)
{
- const char *class;
+ const char *sclass;
if (scope_ptr->st == st_Proc || scope_ptr->st == st_StaticProc)
- class = "func.";
+ sclass = "func.";
else if (scope_ptr->st == st_File)
- class = "file";
+ sclass = "file";
else if (scope_ptr->st == st_Block && scope_ptr->sc == sc_Text)
- class = "block";
+ sclass = "block";
else if (scope_ptr->st == st_Block && scope_ptr->sc == sc_Info)
- class = "type";
+ sclass = "type";
else
- class = "???";
+ sclass = "???";
- printf (" %ld [%s]", scope_ptr->open_sym, class);
+ printf (" %ld [%s]", scope_ptr->open_sym, sclass);
}
printf ("\n");
}
@@ -1345,41 +1345,44 @@ read_tfile (void)
print_sym_hdr (&sym_hdr);
- lines = read_seek (NULL, sym_hdr.cbLine, sym_hdr.cbLineOffset,
- "Line numbers");
+ lines = (LINER *) read_seek (NULL, sym_hdr.cbLine, sym_hdr.cbLineOffset,
+ "Line numbers");
- dense_nums = read_seek (NULL, sym_hdr.idnMax * sizeof (DNR),
- sym_hdr.cbDnOffset, "Dense numbers");
+ dense_nums = (DNR *) read_seek (NULL, sym_hdr.idnMax * sizeof (DNR),
+ sym_hdr.cbDnOffset, "Dense numbers");
- proc_desc = read_seek (NULL, sym_hdr.ipdMax * sizeof (PDR),
- sym_hdr.cbPdOffset, "Procedure tables");
+ proc_desc = (PDR *) read_seek (NULL, sym_hdr.ipdMax * sizeof (PDR),
+ sym_hdr.cbPdOffset, "Procedure tables");
- l_symbols = read_seek (NULL, sym_hdr.isymMax * sizeof (SYMR),
- sym_hdr.cbSymOffset, "Local symbols");
+ l_symbols = (SYMR *) read_seek (NULL, sym_hdr.isymMax * sizeof (SYMR),
+ sym_hdr.cbSymOffset, "Local symbols");
- opt_symbols = read_seek (NULL, sym_hdr.ioptMax * sizeof (OPTR),
- sym_hdr.cbOptOffset, "Optimization symbols");
+ opt_symbols = (OPTR *) read_seek (NULL, sym_hdr.ioptMax * sizeof (OPTR),
+ sym_hdr.cbOptOffset,
+ "Optimization symbols");
- aux_symbols = read_seek (NULL, sym_hdr.iauxMax * sizeof (AUXU),
- sym_hdr.cbAuxOffset, "Auxiliary symbols");
+ aux_symbols = (AUXU *) read_seek (NULL, sym_hdr.iauxMax * sizeof (AUXU),
+ sym_hdr.cbAuxOffset, "Auxiliary symbols");
if (sym_hdr.iauxMax > 0)
- aux_used = xcalloc (sym_hdr.iauxMax, 1);
+ aux_used = (char *) xcalloc (sym_hdr.iauxMax, 1);
- l_strings = read_seek (NULL, sym_hdr.issMax,
- sym_hdr.cbSsOffset, "Local string table");
+ l_strings = (char *) read_seek (NULL, sym_hdr.issMax,
+ sym_hdr.cbSsOffset, "Local string table");
- e_strings = read_seek (NULL, sym_hdr.issExtMax,
- sym_hdr.cbSsExtOffset, "External string table");
+ e_strings = (char *) read_seek (NULL, sym_hdr.issExtMax,
+ sym_hdr.cbSsExtOffset,
+ "External string table");
- file_desc = read_seek (NULL, sym_hdr.ifdMax * sizeof (FDR),
- sym_hdr.cbFdOffset, "File tables");
+ file_desc = (FDR *) read_seek (NULL, sym_hdr.ifdMax * sizeof (FDR),
+ sym_hdr.cbFdOffset, "File tables");
- rfile_desc = read_seek (NULL, sym_hdr.crfd * sizeof (ulong),
- sym_hdr.cbRfdOffset, "Relative file tables");
+ rfile_desc = (ulong *) read_seek (NULL, sym_hdr.crfd * sizeof (ulong),
+ sym_hdr.cbRfdOffset,
+ "Relative file tables");
- e_symbols = read_seek (NULL, sym_hdr.iextMax * sizeof (EXTR),
- sym_hdr.cbExtOffset, "External symbols");
+ e_symbols = (EXTR *) read_seek (NULL, sym_hdr.iextMax * sizeof (EXTR),
+ sym_hdr.cbExtOffset, "External symbols");
}