diff options
Diffstat (limited to 'meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch')
-rw-r--r-- | meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch b/meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch new file mode 100644 index 0000000000..57ecd48b1f --- /dev/null +++ b/meta/recipes-extended/man-db/files/0001-man-Move-local-variable-declaration-to-function-scop.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From e4125223631f0d555fc327da6d8705bcc8ee5ba5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Feb 2022 17:30:16 -0800 | ||
4 | Subject: [PATCH] man: Move local variable declaration to function scope | ||
5 | |||
6 | There is a clang bug [1] unearthed here, so help clang by re-arranging | ||
7 | code without changing the logic, until its fixed in clang | ||
8 | |||
9 | [1] https://github.com/llvm/llvm-project/issues/53692 | ||
10 | |||
11 | Upstream-Status: Inappropriate [Inappropriate: Clang bug] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/man.c | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/man.c b/src/man.c | ||
18 | index 195d35d..6870989 100644 | ||
19 | --- a/src/man.c | ||
20 | +++ b/src/man.c | ||
21 | @@ -379,7 +379,7 @@ static void init_html_pager (void) | ||
22 | 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': | ||
30 | @@ -411,7 +411,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) | ||
31 | 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 | |||