thanks
these are in the next alpha due out today

On Thu, 7 Feb 2013 12:22:48 +0100 Dr. Werner Fink wrote:
> on debugging a crash in ksh93u+ 2012-08-01 and above I've detected
> an side effect which cause trouble due not initialized variables
> in libast/misc/optget.c.  This is fixed in the patch found in the
> attachment.  Beside this it clearifies the meaning of the variable
> n as otherwise the gcc will always trow out a lot of warnings.

>      Werner

> -- 
>   "Having a smoking section in a restaurant is like having
>           a peeing section in a swimming pool." -- Edward Burr

> --ew6BAiZeqk4r7MaW
> Content-Type: text/x-patch; charset=us-ascii
> Content-Description: ksh93-initialized.patch
> Content-Disposition: attachment; filename=x

> --- src/lib/libast/misc/optget.c
> +++ src/lib/libast/misc/optget.c      2013-01-28 14:52:53.000000000 +0000
> @@ -4367,9 +4367,9 @@ optget(register char** argv, const char*
>        */
>  
>       opt_info.assignment = 0;
> -     num = 1;
> -     w = v = 0;
> -     x = 0;
> +     nov = no = num = 1;
> +     e = w = v = 0;
> +     n = x = 0;
>       for (;;)
>       {
>               if (!opt_info.offset)
> @@ -5214,7 +5214,7 @@ optget(register char** argv, const char*
>  
>       if (opt_info.num != LONG_MIN)
>               opt_info.num = (long)(opt_info.number = num);
> -     if ((n = *++s == '#') || *s == ':' || w && !nov && v && (optnumber(v, 
> &e, NiL), n = !*e))
> +     if ((n = (*++s == '#')) || *s == ':' || w && !nov && v && (optnumber(v, 
> &e, NiL), n = !*e))
>       {
>               if (w)
>               {

> --ew6BAiZeqk4r7MaW
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline

> _______________________________________________
> ast-developers mailing list
> [email protected]
> http://lists.research.att.com/mailman/listinfo/ast-developers

> --ew6BAiZeqk4r7MaW--

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to