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]

Patch installed for warning nits


This patch zaps a few noreturn and format warnings.  Bootstrapped on
solaris2.7 and installed as obvious.


Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.9671
diff -u -p -r1.9671 ChangeLog
--- ChangeLog	2001/03/28 17:50:05	1.9671
+++ ChangeLog	2001/03/28 19:23:29
@@ -1,3 +1,12 @@
+2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* toplev.h (fatal_error): Add ATTRIBUTE_NORETURN.
+
+	* tradcif.y (yyerror): Likewise.  Add format specifier in call to
+	`error'.
+	
+	* tradcpp.c (macroexpand): Likewise for call to `error_with_line'.
+
 2001-03-28  DJ Delorie  <dj@redhat.com>
 
 	* Makefile.in (stage1_build): Revert CFLAGS patch.
Index: toplev.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.h,v
retrieving revision 1.58
diff -u -p -r1.58 toplev.h
--- toplev.h	2001/03/10 16:33:56	1.58
+++ toplev.h	2001/03/28 19:23:29
@@ -69,6 +69,7 @@ extern void warning			PARAMS ((const cha
 extern void error			PARAMS ((const char *, ...))
 					       ATTRIBUTE_PRINTF_1;
 extern void fatal_error			PARAMS ((const char *, ...))
+					       ATTRIBUTE_NORETURN
 					       ATTRIBUTE_PRINTF_1;
 extern void pedwarn			PARAMS ((const char *, ...))
 					       ATTRIBUTE_PRINTF_1;
Index: tradcif.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tradcif.y,v
retrieving revision 1.7
diff -u -p -r1.7 tradcif.y
--- tradcif.y	2001/01/28 01:50:07	1.7
+++ tradcif.y	2001/03/28 19:23:29
@@ -28,7 +28,7 @@ Foundation, 59 Temple Place - Suite 330,
 #include <setjmp.h>
 
   static int yylex PARAMS ((void));
-  static void yyerror PARAMS ((const char *msgid));
+  static void yyerror PARAMS ((const char *msgid)) ATTRIBUTE_NORETURN;
 
   static int parse_number PARAMS ((int));
   static int parse_escape PARAMS ((const char **));
@@ -537,7 +537,7 @@ static void
 yyerror (s)
      const char *s;
 {
-  error (s);
+  error ("%s", s);
   longjmp (parse_return_error, 1);
 }
 
Index: tradcpp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tradcpp.c,v
retrieving revision 1.32
diff -u -p -r1.32 tradcpp.c
--- tradcpp.c	2001/01/24 18:44:40	1.32
+++ tradcpp.c	2001/03/28 19:23:30
@@ -4020,7 +4020,7 @@ macroexpand (hp, op)
 	= macarg ((i < nargs || (nargs == 0 && i == 0)) ? &args[i] : 0);
       if (parse_error)
 	{
-	  error_with_line (line_for_error (start_line), parse_error);
+	  error_with_line (line_for_error (start_line), "%s", parse_error);
 	  break;
 	}
       i++;


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