bug-groff
[Top][All Lists]
Advanced

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

[bug #61433] [PATCH] src/roff/troff/div.h: has extra declaration of "do_


From: Bjarni Ingi Gislason
Subject: [bug #61433] [PATCH] src/roff/troff/div.h: has extra declaration of "do_divert(...)"
Date: Fri, 5 Nov 2021 22:54:43 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?61433>

                 Summary: [PATCH] src/roff/troff/div.h: has extra declaration
of  "do_divert(...)"
                 Project: GNU troff
            Submitted by: bjarniig
            Submitted on: Sat 06 Nov 2021 02:54:41 AM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Warning/Suspicious behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

>From a9b2ffe678c6a5ccf3fcae185ace9483d53f1c83 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sat, 6 Nov 2021 02:45:35 +0000
Subject: [PATCH] src/roff/troff/div.h: has extra declaration of
 "do_divert(...)"

  Both "div.h" and "env.h" include "do_divert(...)".

  cpp-files include either both "env.h" and "div.h" or neither,
except "mstm.cpp" which only includes "env.h".

  gcc 11.2.0-10 (Debian testing) reports a repeated declaration of
"do_divert(...)" so it should be commented out in "div.h".

In file included from ../src/roff/troff/div.cpp:31:
../src/roff/troff/div.h:20:6: warning: redundant redeclaration of 'void
do_divert(int, int)' in same scope [-Wredundant-decls]
   20 | void do_divert(int append, int boxing);
      |      ^~~~~~~~~
In file included from ../src/roff/troff/div.cpp:27:
../src/roff/troff/env.h:401:15: note: previous declaration of 'void
do_divert(int, int)'
  401 |   friend void do_divert(int append, int boxing);
      |               ^~~~~~~~~
  CXX      src/roff/troff/env.o
In file included from ../src/roff/troff/env.cpp:28:
../src/roff/troff/div.h:20:6: warning: redundant redeclaration of 'void
do_divert(int, int)' in same scope [-Wredundant-decls]
   20 | void do_divert(int append, int boxing);
      |      ^~~~~~~~~
In file included from ../src/roff/troff/env.cpp:24:
../src/roff/troff/env.h:401:15: note: previous declaration of 'void
do_divert(int, int)'
  401 |   friend void do_divert(int append, int boxing);
      |               ^~~~~~~~~
  CXX      src/roff/troff/input.o
In file included from ../src/roff/troff/input.cpp:30:
../src/roff/troff/div.h:20:6: warning: redundant redeclaration of 'void
do_divert(int, int)' in same scope [-Wredundant-decls]
   20 | void do_divert(int append, int boxing);
      |      ^~~~~~~~~
In file included from ../src/roff/troff/input.cpp:26:
../src/roff/troff/env.h:401:15: note: previous declaration of 'void
do_divert(int, int)'
  401 |   friend void do_divert(int append, int boxing);
      |               ^~~~~~~~~
  CXX      src/roff/troff/mtsm.o
  CXX      src/roff/troff/node.o
In file included from ../src/roff/troff/node.cpp:35:
../src/roff/troff/div.h:20:6: warning: redundant redeclaration of 'void
do_divert(int, int)' in same scope [-Wredundant-decls]
   20 | void do_divert(int append, int boxing);
      |      ^~~~~~~~~
In file included from ../src/roff/troff/node.cpp:31:
../src/roff/troff/env.h:401:15: note: previous declaration of 'void
do_divert(int, int)'
  401 |   friend void do_divert(int append, int boxing);
      |               ^~~~~~~~~
../src/roff/troff/node.cpp: In copy constructor 'tfont_spec::tfont_spec(const
tfont_spec&)':
../src/roff/troff/node.cpp:192:48: warning: implicitly-declared 'constexpr
tfont_spec& tfont_spec::operator=(const tfont_spec&)' is deprecated
[-Wdeprecated-copy]
  192 |   tfont_spec(const tfont_spec &spec) { *this = spec; }
      |                                                ^~~~
../src/roff/troff/node.cpp:192:3: note: because 'tfont_spec' has user-provided
'tfont_spec::tfont_spec(const tfont_spec&)'
  192 |   tfont_spec(const tfont_spec &spec) { *this = spec; }
      |   ^~~~~~~~~~
  CXX      src/roff/troff/number.o
In file included from ../src/roff/troff/number.cpp:26:
../src/roff/troff/div.h:20:6: warning: redundant redeclaration of 'void
do_divert(int, int)' in same scope [-Wredundant-decls]
   20 | void do_divert(int append, int boxing);
      |      ^~~~~~~~~
In file included from ../src/roff/troff/number.cpp:24:
../src/roff/troff/env.h:401:15: note: previous declaration of 'void
do_divert(int, int)'
  401 |   friend void do_divert(int append, int boxing);
      |               ^~~~~~~~~

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 src/roff/troff/div.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

  The patch is in the attachment



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 06 Nov 2021 02:54:41 AM UTC  Name:
0001-src-roff-troff-div.h-has-extra-declaration-of-do_diver.txt  Size: 4KiB  
By: bjarniig
Project groff, comment out a declaration in div.h
<http://savannah.gnu.org/bugs/download.php?file_id=52210>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61433>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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