bugGNU roff - Bugs: bug #64312, [mmroff] throws spurious Perl...

 
 

bug #64312: [mmroff] throws spurious Perl warnings if INITR/PIC used

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Fri 16 Jun 2023 05:23:13 PM UTC
   
 
Category:  Macro package mm Severity:  2 - Minor
Item Group:  Warning/Suspicious behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 25 Sep 2023 01:47:19 PM UTC, comment #1: 

Fixed last month, but forgotten about.


commit 599db456140749533c76d826a5e81c12af00c692
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Aug 24 01:40:13 2023 -0500

    [mm]: Fix code style nits in mmroff.

    * contrib/mm/mmroff.pl: Fix code style nits; resolve Perl warnings.
      Initialize scalars `max_height` and `max_width` before using them.
      Add to `cur` hash instead of reinitializing it when reading "PIC id"
      comment from input.

      (ps_calc): Return early if bounding box keys in `cur` hash not
      populated.

      (psbb): Use `return` instead of `next` to exit early from non-loop.
      Improve diagnostic message: identify who is speaking, what operation
      failed, and end with newline.


G. Branden Robinson <gbranden>
Group administrator
Fri 16 Jun 2023 05:23:13 PM UTC, original submission:  

Affects groff 1.23.0.rc2 and later.


$ file gnu.eps
gnu.eps: PostScript document text conforming DSC level 2.0, type EPS
$ cat EXPERIMENTS/use-PIC.mm
.P
.INITR
Hello,
world!
.PIC gnu.eps
Goodbye,
now!
$ ./build/mmroff EXPERIMENTS/use-PIC.mm >| use-PIC.ps
Use of uninitialized value $max_width in numeric gt (>) at ./build/mmroff line 142.
Use of uninitialized value $max_height in numeric gt (>) at ./build/mmroff line 143.


Probably caused by this commit.


commit 313497a9664fcb4791b322e4c15508da15f64662
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Oct 9 04:42:52 2022 -0500

    contrib/mm/mmroff.pl: Enable Perl warnings.


...but might suggest a logic error.  Check it.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-09-25 gbranden StatusNone Fixed
        Assigned toNone gbranden
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code