aboutsummaryrefslogtreecommitdiff
path: root/gcc/mips-tdump.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-01-04 08:11:13 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-01-04 08:11:13 +0000
commit47e6be47d2035a88c911b7de0c3b750232758f9b (patch)
tree46ef80d4c0cd8a7381791500ac467cb657ed6d73 /gcc/mips-tdump.c
parent736b02fdfa3d7c93a3693e2fa41acf6d3d65df8c (diff)
downloadgcc-47e6be47d2035a88c911b7de0c3b750232758f9b.zip
gcc-47e6be47d2035a88c911b7de0c3b750232758f9b.tar.gz
gcc-47e6be47d2035a88c911b7de0c3b750232758f9b.tar.bz2
Warning fixes:
* mips-tdump.c (st_to_string, sc_to_string, glevel_to_string, lang_to_string, type_to_string): Make return type const char*. (print_symbol): Apply `const' keyword to a char*. (print_file_desc): Cast structure member `crfd' to ulong when comparing against one. * mips-tfile.c (pfatal_with_name): Apply `const' keyword to char*. (fatal, error): Add ATTRIBUTE_PRINTF_1 to prototypes. (progname, input_name): Apply `const' keyword to a char*. Don't redundantly include sys/stat.h. (alloc_info): Apply `const' keyword to a char*. (st_to_string, sc_to_string): Likewise. (hash_string): Cast variable `hash_string' to a symint_t when comparing against one. (add_string): Cast PAGE_USIZE to Ptrdiff_t when comparing against one. Likewise cast it to long when comparing against one. (add_local_symbol): Apply `const' keyword to a char*. (add_ext_symbol): Likewise. (add_unknown_tag): Likewise. (add_procedure): Cast a printf-style field width to an int. (add_file): Cast PAGE_USIZE to long when comparing against one (parse_begin): Cast a printf-style field width to an int. (parse_bend): Likewise. (parse_def): Likewise. (parse_end): Likewise. (mark_stabs): Mark parameter `start' with ATTRIBUTE_UNUSED. (parse_stabs_common): Fix format specifier. (parse_input): Change type of variable `i' to Size_t. (write_object): Fix arguments to match format specifiers. Cast variable `num_write' to long when comparing against one. (read_seek): Cast variable `sys_read' to symint_t when comparing against one. Fix arguments to match format specifiers. Cast variable `size' to long when comparing against one. (copy_object): Cast result of `sizeof' to int when comparing against one. Fix arguments to match format specifiers. Cast variable `ifd' to long when comparing against a signed value. Likewise, likewise. From-SVN: r24479
Diffstat (limited to 'gcc/mips-tdump.c')
-rw-r--r--gcc/mips-tdump.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c
index fdf018e..5877c56 100644
--- a/gcc/mips-tdump.c
+++ b/gcc/mips-tdump.c
@@ -78,7 +78,7 @@ xmalloc (size)
return value;
}
-/* Do to size_t being defined in sys/types.h and different
+/* Due to size_t being defined in sys/types.h and different
in stddef.h, we have to do this by hand..... Note, these
types are correct for MIPS based systems, and may not be
correct for other systems. */
@@ -269,11 +269,11 @@ void print_file_desc __proto((FDR *, int));
void print_symbol __proto((SYMR *, int, char *, AUXU *, int, FDR *));
void print_aux __proto((AUXU, int, int));
void emit_aggregate __proto((char *, AUXU, AUXU, const char *, FDR *));
-char *st_to_string __proto((st_t));
-char *sc_to_string __proto((sc_t));
-char *glevel_to_string __proto((glevel_t));
-char *lang_to_string __proto((lang_t));
-char *type_to_string __proto((AUXU *, int, FDR *));
+const char *st_to_string __proto((st_t));
+const char *sc_to_string __proto((sc_t));
+const char *glevel_to_string __proto((glevel_t));
+const char *lang_to_string __proto((lang_t));
+const char *type_to_string __proto((AUXU *, int, FDR *));
#ifndef __alpha
# ifdef NEED_DECLARATION_MALLOC
@@ -336,7 +336,7 @@ read_seek (ptr, size, offset, context)
/* Convert language code to string format. */
-char *
+const char *
lang_to_string (lang)
lang_t lang;
{
@@ -359,7 +359,7 @@ lang_to_string (lang)
/* Convert storage class to string. */
-char *
+const char *
sc_to_string(storage_class)
sc_t storage_class;
{
@@ -397,7 +397,7 @@ sc_to_string(storage_class)
/* Convert symbol type to string. */
-char *
+const char *
st_to_string(symbol_type)
st_t symbol_type;
{
@@ -438,7 +438,7 @@ st_to_string(symbol_type)
/* Convert debug level to string. */
-char *
+const char *
glevel_to_string (g_level)
glevel_t g_level;
{
@@ -456,7 +456,7 @@ glevel_to_string (g_level)
/* Convert the type information to string format. */
-char *
+const char *
type_to_string (aux_ptr, index, fdp)
AUXU *aux_ptr;
int index;
@@ -1025,7 +1025,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
scope_ptr != (scope_t *) 0;
scope_ptr = scope_ptr->prev)
{
- char *class;
+ const char *class;
if (scope_ptr->st == st_Proc || scope_ptr->st == st_StaticProc)
class = "func.";
else if (scope_ptr->st == st_File)
@@ -1057,7 +1057,7 @@ print_symbol (sym_ptr, number, strbase, aux_base, ifd, fdp)
if (MIPS_IS_STAB(sym_ptr))
{
register int i = sizeof(stab_names) / sizeof(stab_names[0]);
- char *stab_name = "stab";
+ const char *stab_name = "stab";
short code = MIPS_UNMARK_STAB(sym_ptr->index);
while (--i >= 0)
if (stab_names[i].code == code)
@@ -1275,7 +1275,7 @@ print_file_desc (fdp, number)
(ulong) fdp->rfdBase);
rfd_ptr = rfile_desc + fdp->rfdBase;
- for (i = 0; i < fdp->crfd; i++)
+ for (i = 0; i < (ulong) fdp->crfd; i++)
{
printf ("\t#%-5ld %11ld, 0x%08lx\n", i, *rfd_ptr, *rfd_ptr);
rfd_ptr++;