Warning nits installed (exposed by enable-checking)

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Jun 15 11:17:00 GMT 2000


I installed a couple of warning fixes exposed by enable-checking
(which is now the default.)

Bootstrapped on solaris2.7.

		--Kaveh



Thu Jun 15 14:03:14 2000  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

f:
	* ste.c (gbe_block): Constify.

java:
	* jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
	types the same in comparison.
	(CHECK_OP): Add static prototype.

diff -rup orig/egcs-CVS20000614/gcc/f/ste.c egcs-CVS20000614/gcc/f/ste.c
--- orig/egcs-CVS20000614/gcc/f/ste.c	Sun Feb 27 20:31:28 2000
+++ egcs-CVS20000614/gcc/f/ste.c	Thu Jun 15 10:14:43 2000
@@ -402,7 +402,7 @@ typedef struct gbe_block
   struct gbe_block *outer;
   ffestw block;
   int lineno;
-  char *input_filename;
+  const char *input_filename;
   bool is_stmt;
 } *gbe_block;
 
diff -rup orig/egcs-CVS20000614/gcc/java/jcf-write.c egcs-CVS20000614/gcc/java/jcf-write.c
--- orig/egcs-CVS20000614/gcc/java/jcf-write.c	Sun Jun 11 00:01:24 2000
+++ egcs-CVS20000614/gcc/java/jcf-write.c	Thu Jun 15 10:27:17 2000
@@ -348,14 +348,16 @@ static void append_innerclasses_attribut
    write next, and we assume enoygh space has been allocated. */
 
 #ifdef ENABLE_CHECKING
-int
+static int CHECK_PUT PARAMS ((void *, struct jcf_partial *, int));
+
+static int
 CHECK_PUT(ptr, state, i)
      void *ptr;
      struct jcf_partial *state;
      int i;
 {
-  if (ptr < state->chunk->data
-      || (char*)ptr + i > state->chunk->data + state->chunk->size)
+  if ((unsigned char *)ptr < state->chunk->data
+      || (unsigned char*)ptr + i > state->chunk->data + state->chunk->size)
     fatal ("internal error - CHECK_PUT failed");
   return 0;
 }
@@ -402,7 +404,9 @@ alloc_chunk (last, data, size, work)
 }
 
 #ifdef ENABLE_CHECKING
-int
+static int CHECK_OP PARAMS ((struct jcf_partial *));
+
+static int
 CHECK_OP(struct jcf_partial *state)
 {
   if (state->bytecode.ptr > state->bytecode.limit)


More information about the Gcc-patches mailing list