blob: 57ecd48b1f3610f366de3cb628a8f65b0c214d55 [file] [log] [blame]
Patrick Williams44b3caf2024-04-12 16:51:14 -05001From e4125223631f0d555fc327da6d8705bcc8ee5ba5 Mon Sep 17 00:00:00 2001
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002From: 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>
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000013---
14 src/man.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/src/man.c b/src/man.c
Patrick Williams44b3caf2024-04-12 16:51:14 -050018index 195d35d..6870989 100644
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000019--- a/src/man.c
20+++ b/src/man.c
Patrick Williams44b3caf2024-04-12 16:51:14 -050021@@ -379,7 +379,7 @@ static void init_html_pager (void)
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000022 static error_t parse_opt (int key, char *arg, struct argp_state *state)
23 {
24 static bool apropos, whatis; /* retain values between calls */
25-
26+ char *s;
27 /* Please keep these keys in the same order as in options above. */
28 switch (key) {
29 case 'C':
Patrick Williams44b3caf2024-04-12 16:51:14 -050030@@ -411,7 +411,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000031 case OPT_WARNINGS:
32 #ifdef NROFF_WARNINGS
33 {
34- char *s = xstrdup
35+ s = xstrdup
36 (arg ? arg : default_roff_warnings);
37 const char *warning;
38