[options]: Start moving help text to .opt files
Neil Booth
neil@daikokuya.co.uk
Tue Jul 8 21:07:00 GMT 2003
Andreas Jaeger wrote:-
> Neil Booth <neil@daikokuya.co.uk> writes:
>
> > [...]
> > +/* Output --help text. */
> > +static void
> > +print_help (void)
> > +{
> > + size_t i, len;
>
> No need for size_t i here. cl_options_count is unsigned int, so i can
> be the same type.
Good point. This failure didn't occur for my bootstrap (something to
do with typedefs I'd guess).
I've tried a stage1 with -Wformat and this and it seems OK, so I've
applied it. Let me know if it causes you a problem for some reason.
Neil.
* opts.c (wrap_help): Use unsigned int, not size_t.
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.25
diff -u -p -r1.25 opts.c
--- opts.c 8 Jul 2003 05:25:39 -0000 1.25
+++ opts.c 8 Jul 2003 21:05:11 -0000
@@ -1526,8 +1526,8 @@ print_help (void)
static void
wrap_help (const char *help, const char *item, size_t item_width)
{
- const size_t columns = 80, col_width = 27;
- size_t remaining, room, len;
+ const unsigned int columns = 80, col_width = 27;
+ unsigned int remaining, room, len;
remaining = strlen (help);
@@ -1538,7 +1538,7 @@ wrap_help (const char *help, const char
if (room < len)
{
- size_t i;
+ unsigned int i;
for (i = 0; help[i]; i++)
{
More information about the Gcc-patches
mailing list