groff-commit
[Top][All Lists]
Advanced

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

[groff] 16/28: [troff]: Pacify compiler warning.


From: G. Branden Robinson
Subject: [groff] 16/28: [troff]: Pacify compiler warning.
Date: Sun, 25 Aug 2024 23:03:31 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit d3d14cae8484ba6add8642e3848ec4d4f2eee02f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Aug 25 16:28:55 2024 -0500

    [troff]: Pacify compiler warning.
    
    * src/roff/troff/node.cpp (charinfo_node::ends_sentence): Fix compiler
      warning.
    
      warning: control reaches end of non-void function [-Wreturn-type]
    
      Not the most penetrating exhibit of control flow analysis.
---
 ChangeLog               | 10 ++++++++++
 src/roff/troff/node.cpp |  3 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fdcf3e319..9fe1a4eb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-08-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/roff/troff/node.cpp (charinfo_node::ends_sentence): Fix
+       compiler warning.
+
+       warning: control reaches end of non-void function
+       [-Wreturn-type]
+
+       Not the most penetrating exhibit of control flow analysis.
+
 2024-08-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [mdoc]: Check for correct and diagnostic-free behavior of
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 1a4520747..887c5db65 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -1859,8 +1859,7 @@ int charinfo_node::ends_sentence()
     return 1;
   else if (ci->transparent())
     return 2;
-  else
-    return 0;
+  return 0;
 }
 
 int charinfo_node::overlaps_horizontally()



reply via email to

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