diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-06-03 19:50:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-06-03 19:50:33 +0000 |
commit | daa462ce407538b363fe9ffa864ed82ff958ebb1 (patch) | |
tree | 715610ec249883e05ca8063917c2a1231f6d9868 /mdoc_term.c | |
parent | 6c467e8e8685ea6c34efbf37519b8d5adfb3ff59 (diff) | |
download | mandoc-daa462ce407538b363fe9ffa864ed82ff958ebb1.tar.gz |
Initialize the local variable "act" in print_mdoc_node().
While there is no bug, it helps clarity, and it is also safer in this
particular code because in case a bug gets introduced later, accessing
a NULL pointer is less dangerous than accessing an uninitialized pointer.
Michal Nowak <mnowak at startmail dot com> reported that gcc 4.4.4
and 7.4.0 on illumos throw -Wuninitialized false positives.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 6ef49375..9abdcfa0 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -352,6 +352,7 @@ print_mdoc_node(DECL_ARGS) * produce output. Note that some pre-handlers do so. */ + act = NULL; switch (n->type) { case ROFFT_TEXT: if (n->flags & NODE_LINE) { |