[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60398] [mm] initialize two string array elements let*ia-{name, tit
From: |
G. Branden Robinson |
Subject: |
[bug #60398] [mm] initialize two string array elements let*ia-{name, title}!n to avoid warnings |
Date: |
Tue, 4 Oct 2022 04:19:41 -0400 (EDT) |
Update of bug #60398 (project groff):
Status: None => Invalid
Assigned to: None => gbranden
Open/Closed: Open => Closed
Summary: [PATCH] [mm] initialize two string array elements
let*ia-{name,title}!n to avoid warnings => [mm] initialize two string array
elements let*ia-{name,title}!n to avoid warnings
_______________________________________________________
Follow-up Comment #1:
You haven't identified any input that would produce the warnings.
In other words, you haven't established that there exists an execution trace
wherein uninitialized strings are dereferenced.
A simple experiment shows that an mm letter can be composed without either
writer's or inside address data, without producing diagnostics.
$ printf '.LT\n.P\nHello.\n' | nroff -ww -mm 2>&1 >/dev/null | grep . || echo
EMPTY
EMPTY
(This is with groff 1.22.4.)
Further, we can also see that these strings are dereferenced only within while
loops that are not entered if the quantity of such addresses is zero.
...
3318 .\"------------------------
3319 .de let*lt-sign
...
3322 .nr let*i 0 1
3323 .nr let*j 0
3324 .while \\n+[let*i]<=\\n[let*wa-n] \{\
3325 .if \\n[let*i]=\\n[let*wa-n] .nr let*j 1
3326 .let@sg_\\*[let*type] "\\*[let*wa-name!\\n[let*i]]"
"\\*[let*wa-title!\\n[let*i]]" \\n[let*i] \\n[let*j] \\$@
3327 .\}
3480 .\" Print the letter-head
3481 .de let@print-head
...
3507 .nr let*i 0 1
3508 .while \\n+[let*i]<=\\n[let*ia-n] \{\
3509 \\*[let*ia-name!\\n[let*i]]
3510 \\*[let*ia-title!\\n[let*i]]
3511 .\}
...
3539 .\"-------------------
3540 .\" .IA [name [title]]
3541 .nr let*ia-n 0 1
3542 .de IA
3543 .if \\n[.$] .ds let*ia-name!\\n+[let*ia-n] \\$1
3544 .if \\n[.$]>1 .ds let*ia-title!\\n[let*ia-n] \\$2
3545 .ev let@ev
3546 .init@reset
3547 'nf
3548 .di let@ia-div
3549 .eo
3550 ..
...
3556 .\"-------------------
3557 .\" .WA [name [title]]
3558 .nr let*wa-n 0 1
3559 .de WA
3560 .if \\n[.$] .ds let*wa-name!\\n+[let*wa-n] \\$1
3561 .if \\n[.$]>1 .ds let*wa-title!\\n[let*wa-n] \\$2
3562 .ev let@ev
3563 .init@reset
3564 'nf
3565 .di let@wa-div
3566 .it \\n[Letwam] let@wa-drain
3567 .eo
3568 ..
Removing patch annotation. Closing as invalid.
If you can come up with an input document that provokes diagnostics due to
errors in the macro package, please do so. The problem must be clearly
demonstrated before a patch can be appropriate.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60398>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #60398] [mm] initialize two string array elements let*ia-{name, title}!n to avoid warnings,
G. Branden Robinson <=