gbranden pushed a commit to branch master
in repository groff.
commit 831a55865788dac44861b07c632fb636e15d8d4b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Sep 20 15:50:57 2021 +1000
[grohtml]: Fix compiler warning and dead store.
* src/devices/grohtml/post-html.cpp (html_printer::special): Update call
of `font::load_font()` to stop passing obsolete parameter (deleted by
me in 2dff87d3, 17 September). The value stored to the parameter by
that function was never read anyway, so also get rid of the variable
that contained it.
Fixes <https://savannah.gnu.org/bugs/?61187>. Thanks to Bjarni Ingi
Gislason for the report.
---
ChangeLog | 13 +++++++++++++
src/devices/grohtml/post-html.cpp | 14 ++++----------
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd7dba8..75664be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2021-09-19 G. Branden Robinson <[email protected]>
+ [grohtml]: Fix compiler warning and dead store.
+
+ * src/devices/grohtml/post-html.cpp (html_printer::special):
+ Update call of `font::load_font()` to stop passing obsolete
+ parameter (deleted by me in 2dff87d3, 17 September). The value
+ stored to the parameter by that function was never read anyway,
+ so also get rid of the variable that contained it.
+
+ Fixes <https://savannah.gnu.org/bugs/?61187>. Thanks to Bjarni
+ Ingi Gislason for the report.
+
+2021-09-19 G. Branden Robinson <[email protected]>
+
[libgroff]: Slightly refactor.
* src/include/font.h (font::scan_papersize): Demote return type
diff --git a/src/devices/grohtml/post-html.cpp
b/src/devices/grohtml/post-html.cpp
index 0795abf..5758280 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -5302,11 +5302,8 @@ void html_printer::special(char *s, const environment
*env, char type)
int r=font::res; /* resolution of the device */
font *f=sbuf_style.f;
- if (f == NULL) {
- int found=FALSE;
-
- f = font::load_font("TR", &found);
- }
+ if (f == NULL)
+ f = font::load_font("TR");
/*
* need to pass rest of string through to html output during flush
@@ -5330,11 +5327,8 @@ void html_printer::special(char *s, const environment
*env, char type)
font *f=sbuf_style.f;
string t;
- if (f == NULL) {
- int found=FALSE;
-
- f = font::load_font("TR", &found);
- }
+ if (f == NULL)
+ f = font::load_font("TR");
if (strncmp(s, "math<?p>:", 9) == 0) {
if (strncmp((char *)&s[9], "<math>", 6) == 0) {
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit