blob: 57ecd48b1f3610f366de3cb628a8f65b0c214d55 [file] [log] [blame]
From e4125223631f0d555fc327da6d8705bcc8ee5ba5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 9 Feb 2022 17:30:16 -0800
Subject: [PATCH] man: Move local variable declaration to function scope
There is a clang bug [1] unearthed here, so help clang by re-arranging
code without changing the logic, until its fixed in clang
[1] https://github.com/llvm/llvm-project/issues/53692
Upstream-Status: Inappropriate [Inappropriate: Clang bug]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/man.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/man.c b/src/man.c
index 195d35d..6870989 100644
--- a/src/man.c
+++ b/src/man.c
@@ -379,7 +379,7 @@ static void init_html_pager (void)
static error_t parse_opt (int key, char *arg, struct argp_state *state)
{
static bool apropos, whatis; /* retain values between calls */
-
+ char *s;
/* Please keep these keys in the same order as in options above. */
switch (key) {
case 'C':
@@ -411,7 +411,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
case OPT_WARNINGS:
#ifdef NROFF_WARNINGS
{
- char *s = xstrdup
+ s = xstrdup
(arg ? arg : default_roff_warnings);
const char *warning;