[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/8] Fix [-Werror=shadow] on OS/2
From: |
KO Myung-Hun |
Subject: |
[PATCH 7/8] Fix [-Werror=shadow] on OS/2 |
Date: |
Sun, 20 Nov 2022 23:42:56 +0900 |
* src/job.c (construct_command_argv_internal) [__EMX__]: Just reuse
variables.
---
src/job.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/job.c b/src/job.c
index 9f1e4a3b..800f3b30 100644
--- a/src/job.c
+++ b/src/job.c
@@ -3553,9 +3553,9 @@ construct_command_argv_internal (char *line, char
**restp, const char *shell,
/* new_line is local, must not be freed therefore
We use line here instead of new_line because we run the shell
manually. */
- size_t line_len = strlen (line);
- char *p = new_line;
char *q = new_line;
+ line_len = strlen (line);
+ p = new_line;
memcpy (new_line, line, line_len + 1);
/* Replace all backslash-newline combination and also following tabs.
Important: stop at the first '\n' because that's what the loop above
--
2.30.0
- [PATCH 0/8] Fix compilation on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 1/8] Update README.OS2, KO Myung-Hun, 2022/11/20
- [PATCH 3/8] Fix assignment of read-only location error on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 4/8] Fix [-Werror=unused-variable] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 2/8] Define a HAVE___STRCHRNUL macro properly, KO Myung-Hun, 2022/11/20
- [PATCH 5/8] Fix [-Werror=discarded-qualifiers] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 6/8] Fix [-Werror=incompatible-pointer-types] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 7/8] Fix [-Werror=shadow] on OS/2,
KO Myung-Hun <=
- [PATCH 8/8] Fix [-Werror=dangling-else] on OS/2, KO Myung-Hun, 2022/11/20