bugGNU troff - Bugs: bug #61436, [PATCH] pacify the compiler for...

 
 

bug #61436: [PATCH] pacify the compiler for unconditional "define DEBUGGING"

Submitted by:  Bjarni Ingi Gislason <bjarniig>
Submitted on:  Sat 06 Nov 2021 05:27:11 PM UTC
 
Category:  Core Severity:  2 - Minor
Item Group:  Warning/Suspicious behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 01 Dec 2021 06:08:12 PM UTC, comment #2: 

commit a3daee41bb076e93cb5443ffab584b125a76306d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Nov 28 01:04:22 2021 +1100

    [post-grohtml]: Remove `DEBUGGING` preprocessor cruft.

    * src/devices/grohtml/html-text.cpp:
    * src/devices/grohtml/output.cpp: Stop undefining `DEBUGGING`
      preprocessor macro.

commit 1cca91f4f04a09bdaf022fbc93575fd16f520092
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Nov 27 23:05:11 2021 +1100

    [troff]: Remove `DEBUGGING` preprocessor cruft.

    * src/roff/troff/input.cpp:
    * src/roff/troff/mtsm.cpp: Stop defining `DEBUGGING` preprocessor macro
      (as empty).

    * src/roff/troff/input.cpp: Give `DEBUG_OPTION` an empty string value if
      the former is undefined, so the `getopt_long()` call will compile.

    Fixes <https://savannah.gnu.org/bugs/?61436>.  Thanks to Bjarni Ingi
    Gislason for the report.

    Also update editor aid comments; drop old style Emacs file-local
    variable setting.

G. Branden Robinson <gbranden>
Project Administrator
Sat 27 Nov 2021 12:04:47 PM UTC, comment #1: 

Thanks, Bjarni.  I'll fix this by just undefining both, and ensuring `DEBUG_OPTION` (later in input.cpp) is defined.

A developer can always add -DDEBUGGING to MAKEFLAGS.

G. Branden Robinson <gbranden>
Project Administrator
Sat 06 Nov 2021 05:27:11 PM UTC, original submission:  

From a42dbdb9d7e43da1f20278d918a9de0457019535 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sat, 6 Nov 2021 17:21:02 +0000
Subject: [PATCH] pacify the compiler for unconditional "define DEBUGGING"

  Test if "DEBUGGING" is defined before redefining it.

  CXX      src/roff/troff/input.o
../src/roff/troff/input.cpp:19: warning: "DEBUGGING" redefined
   19 | #define DEBUGGING
      |
<command-line>: note: this is the location of the previous definition
  CXX      src/roff/troff/mtsm.o
../src/roff/troff/mtsm.cpp:20: warning: "DEBUGGING" redefined
   20 | #define DEBUGGING
      |

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 src/roff/troff/input.cpp | 4 +++-
 src/roff/troff/mtsm.cpp  | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

  The patch is in the attachment

Bjarni Ingi Gislason <bjarniig>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #52212:  0001-pacify-the-compiler-for-unconditional-define-DEBUGGING.txt added by bjarniig (2KiB - text/plain - Project groff, pacify compiler)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by bjarniig (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-01 gbranden StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 1.23.0
    2021-11-27 gbranden Severity3 - Normal => 2 - Minor
    2021-11-27 gbranden StatusNone => In Progress
        Assigned toNone => gbranden
    2021-11-06 bjarniig Attached File- => Added 0001-pacify-the-compiler-for-unconditional-define-DEBUGGING.txt, #52212

    Back to the top


    Powered by Savane 3.9