public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [ecj] Patch: FYI: fix jcf-dump warnings
@ 2006-07-08  0:29 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2006-07-08  0:29 UTC (permalink / raw)
  To: Java Patch List; +Cc: Gcc Patch List

I'm checking this in on the gcj-eclipse branch.

Andrew Hughes pointed out a couple of warnings when compiling jcf-dump.c.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
	earlier.
	(HANDLE_SIGNATURE_ATTRIBUTE): Likewise.

Index: jcf-dump.c
===================================================================
--- jcf-dump.c	(revision 115280)
+++ jcf-dump.c	(working copy)
@@ -384,9 +384,10 @@
   if (c != '\r' && c != '\n') fputc('\n', out); }
 
 #define HANDLE_ENCLOSINGMETHOD_ATTRIBUTE()				\
-{ COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length);	\
-  uint16 class_index = JCF_readu2 (jcf);				\
-  uint16 method_index = JCF_readu2 (jcf);				\
+  { uint16 class_index, method_index;					\
+  COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length);	\
+  class_index = JCF_readu2 (jcf);					\
+  method_index = JCF_readu2 (jcf);					\
   fprintf (out, "\n  Class: ");						\
   print_constant_terse_with_index (out, jcf, class_index, CONSTANT_Class); \
   fprintf (out, "\n  Method: ");					\
@@ -397,8 +398,9 @@
 
 #define HANDLE_SIGNATURE_ATTRIBUTE()					\
 {									\
+  uint16 signature;							\
   COMMON_HANDLE_ATTRIBUTE(jcf, attribute_name, attribute_length);	\
-  uint16 signature = JCF_readu2 (jcf);					\
+  signature = JCF_readu2 (jcf);						\
   fprintf (out, "\n  Value: ");						\
   print_constant_terse_with_index (out, jcf, signature, CONSTANT_Utf8);	\
   fputc ('\n', out);							\

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-08  0:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-08  0:29 [ecj] Patch: FYI: fix jcf-dump warnings Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).