This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix some warnings in libobjc after tree-ssa merge


Some true warnings in that objc_read_string did not set the
second argument all the time.

Committed after checking to make sure that it fixed the warnings.

ChangeLog:

        * archive.c (objc_read_class): Initialize class_name.
        (objc_read_selector): Initialize selector_name.

Patch:
Index: archive.c
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/archive.c,v
retrieving revision 1.6
diff -u -p -r1.6 archive.c
--- archive.c	23 May 2003 20:04:58 -0000	1.6
+++ archive.c	13 May 2004 18:58:14 -0000
@@ -887,7 +887,7 @@ objc_read_class (struct objc_typed_strea

       if (buf[0] == (_B_EXT | _BX_CLASS))
 	{
-	  char *class_name;
+	  char *class_name = "";
 	  unsigned long version;

 	  /* get class */
@@ -938,7 +938,7 @@ objc_read_selector (struct objc_typed_st

       if (buf[0] == (_B_EXT|_BX_SEL)) /* selector! */
 	{
-	  char *selector_name;
+	  char *selector_name = "";

 	  /* get selector */
 	  len = objc_read_string (stream, &selector_name);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]