bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk 3.1.6: rand.awk test case alignment problem


From: Aharon Robbins
Subject: Re: gawk 3.1.6: rand.awk test case alignment problem
Date: Wed, 23 Apr 2008 22:25:51 +0300

Hi. I will be applying your rand.awk patch shortly.

However, with respect to this:

> As an aside, when trying to locate the problem I used -Wextra which gives
> this warning (amongst others):
>
> dfa.c: At top level:
> dfa.c:762: warning: missing initializer
> dfa.c:762: warning: (near initialization for 'prednames[12].pred')
>
> This turned out to be a red-herring. I think the following change may better
> reflect what the compiler actually produces, and what the programmer
> intended. (It's some time now since I looked at this, but I think that the
> search of the array can't run off the end.)
>
> --- gawk-3.1.6/dfa.c            2007-09-03 03:30:12 +0000
> +++ gawk-3.1.6.ro2/dfa.c        2008-01-02 14:22:54 +0000
> @@ -759,7 +759,6 @@ static struct {
>    { ":graph:]", is_graph },
>    { ":cntrl:]", is_cntrl },
>    { ":blank:]", is_blank },
> -  { 0 }
>  };

The correct fix is actually to supply two zeros in that final initializer,
since the code that uses this array does expect there to be a NULL pointer in
the final element.

Thanks for pointing this out.  The fix will be showing up in CVS soon.

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]