1From 126dfefb5fddf411ad0a1316209e9c1b47abfcd2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Feb 2022 17:30:16 -0800
4Subject: [PATCH] man: Move local variable declaration to function scope
5
6There is a clang bug [1] unearthed here, so help clang by re-arranging
7code without changing the logic, until its fixed in clang
8
9[1] https://github.com/llvm/llvm-project/issues/53692
10
11Upstream-Status: Inappropriate [Inappropriate: Clang bug]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14---
15 src/man.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/src/man.c b/src/man.c
19index f16fae8..333df03 100644
20--- a/src/man.c
21+++ b/src/man.c
22@@ -352,7 +352,7 @@ static void init_html_pager (void)
23 static error_t parse_opt (int key, char *arg, struct argp_state *state)
24 {
25 	static bool apropos, whatis; /* retain values between calls */
26-
27+	char *s;
28 	/* Please keep these keys in the same order as in options above. */
29 	switch (key) {
30 		case 'C':
31@@ -384,7 +384,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
32 		case OPT_WARNINGS:
33 #ifdef NROFF_WARNINGS
34 			{
35-				char *s = xstrdup
36+				s = xstrdup
37 					(arg ? arg : default_roff_warnings);
38 				const char *warning;
39
40