bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Warning message issued with no source line number


From: Peter J. Farley III
Subject: Re: [bug-gawk] Warning message issued with no source line number
Date: Tue, 16 May 2017 20:34:01 -0400

> -----Original Message-----
> From: Andrew J. Schorr [mailto:address@hidden
> Sent: Tuesday, May 16, 2017 8:08 PM
> To: Peter J. Farley III
> Cc: address@hidden
> Subject: Re: [bug-gawk] Warning message issued with no source line
> number
<Snipped> 
> Thanks. This can be simplified as follows:
> 
> bash-4.2$ cat /tmp/test.awk
> BEGIN {
>     if (dbg) \
>         print "DEBUG:maxndx=" maxndx ",allndx=" allndx \
>               ",maxsum=" maxsum ",sumndx=" sumndx
>               ",hx=" hx
> }
> bash-4.2$ gawk --lint -f /tmp/test.awk
> gawk: warning: statement may have no effect
> gawk: /tmp/test.awk:2: warning: reference to uninitialized variable
> `dbg'
> gawk: /tmp/test.awk:5: warning: reference to uninitialized variable
`hx'
> 
> The warning is due to the lack of the line continuation character
after
> "sumndx", but that doesn't explain why there is no filename or line
> number.
> That requires further debugging.

Many thanks Andy.  My eyes just glazed on past that multi-line
statement without seeing the missing continuation character.

Please let me know how the further debugging goes.

Regards,

Peter
--




reply via email to

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