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]

Re: [c-common.c] warnings: -Wformat and -Wnonnull


> The sole call to warning() is already guarded by OPT_Wattributes
> which is wrong and should be changed to
> OPT_Wmissing_format_attribute.

That looks obvious now that you point it out.  Committed.

> check_format_info, instead, is called by check_function_format and
> warnings there should be guarded by OPT_Wformat.

Those warnings previously had explicit checks for the more specific
warning options, which is what those OPT_* are based on.


2005-07-22  DJ Delorie  <dj@redhat.com>

	* c-format.c (check_function_format): Change warning control
	option from OPT_Wattribute to OPT_Wmissing_format_attribute.

Index: c-format.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-format.c,v
retrieving revision 1.83
diff -p -U3 -r1.83 c-format.c
--- c-format.c	19 Jul 2005 12:09:30 -0000	1.83
+++ c-format.c	22 Jul 2005 17:09:22 -0000
@@ -896,8 +896,8 @@ check_function_format (tree attrs, tree 
 			break;
 		    }
 		  if (args != 0)
-		    warning (OPT_Wattributes, "function might be possible "
-			     "candidate for %qs format attribute",
+		    warning (OPT_Wmissing_format_attribute, "function might "
+			     "be possible candidate for %qs format attribute",
 			     format_types[info.format_type].name);
 		}
 	    }


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