groff-commit
[Top][All Lists]
Advanced

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

[groff] 18/20: [libgroff, troff]: Annotate seemingly dead code.


From: G. Branden Robinson
Subject: [groff] 18/20: [libgroff, troff]: Annotate seemingly dead code.
Date: Fri, 9 Aug 2024 00:24:30 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit d13b9d5e8418ed24e45d6a7f4d06b98eca234055
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Aug 8 22:27:39 2024 -0500

    [libgroff, troff]: Annotate seemingly dead code.
    
    I use `debug()` almost daily in development.  If someone took it away
    I'd be quite cross.
    
    Prompted by Dave Kemper in <https://savannah.gnu.org/bugs/?64463>.
---
 src/libs/libgroff/error.cpp | 2 ++
 src/roff/troff/input.cpp    | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/libs/libgroff/error.cpp b/src/libs/libgroff/error.cpp
index b1a4e61c1..fd1de6b6b 100644
--- a/src/libs/libgroff/error.cpp
+++ b/src/libs/libgroff/error.cpp
@@ -96,6 +96,7 @@ static void do_error(error_type type,
                              arg3);
 }
 
+// This function should have no callers in production builds.
 void debug(const char *format,
           const errarg &arg1,
           const errarg &arg2,
@@ -134,6 +135,7 @@ void fatal(const char *format,
 // would need to temporarily change their values and has multiple return
 // paths might prefer these to the simpler variants above.
 
+// This function should have no callers in production builds.
 void debug_with_file_and_line(const char *filename,
                              int lineno,
                              const char *format,
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 7a75e4b28..61529276c 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -9116,6 +9116,7 @@ static void do_error(error_type type,
     cleanup_and_exit(EXIT_FAILURE);
 }
 
+// This function should have no callers in production builds.
 void debug(const char *format,
           const errarg &arg1,
           const errarg &arg2,
@@ -9203,6 +9204,7 @@ void error_with_file_and_line(const char *filename, int 
lineno,
   fflush(stderr);
 }
 
+// This function should have no callers in production builds.
 void debug_with_file_and_line(const char *filename,
                              int lineno,
                              const char *format,



reply via email to

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