gbranden pushed a commit to branch master
in repository groff.

commit 0465d29bf4093044abc96a9687e6e17dea782e2f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Sep 19 19:20:09 2025 -0500

    [troff]: Fix misleading warning diagnostic.
    
    * src/roff/troff/hvunits.h (hunits operator -): Fix misleading warning
      diagnostic arising from copy-and-paste error; the saturating operation
      is multiplication, not subtraction (when not decrementing, "-256" <=>
      "-1*256").
---
 ChangeLog                | 7 +++++++
 src/roff/troff/hvunits.h | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 058361381..7cf6d8aa7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-09-19  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/hvunits.h (hunits operator -): Fix misleading
+       warning diagnostic arising from copy-and-paste error; the
+       saturating operation is multiplication, not subtraction (when
+       not decrementing, "-256" <=> "-1*256").
+
 2025-09-18  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/node.cpp: Refactor.
diff --git a/src/roff/troff/hvunits.h b/src/roff/troff/hvunits.h
index 7ff6e9ac1..217e4d3eb 100644
--- a/src/roff/troff/hvunits.h
+++ b/src/roff/troff/hvunits.h
@@ -239,7 +239,7 @@ inline hunits operator -(const hunits & x)
   r = x;
   // Why?  Consider -(INT_MIN) in two's complement.
   if (ckd_mul(&r.n, x.n, -1))
-    warning(WARN_RANGE, "integer subtraction saturated");
+    warning(WARN_RANGE, "integer multiplication saturated");
   return r;
 }
 

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to