summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-10-01 18:34:29 +0300
committerEli Zaretskii <eliz@gnu.org>2014-10-01 18:34:29 +0300
commit1afb0ad372a1692fc5f886dd8059a9d4ef667e71 (patch)
tree67f9871419d0b7ecef0db0bcdaae4219317dc258 /job.c
parent86a058029beb8c5516eed4293de2a8b9131f3438 (diff)
downloadgunmake-1afb0ad372a1692fc5f886dd8059a9d4ef667e71.tar.gz
Avoid compilation warnings.
* main.c (find_and_set_default_shell, main) [WINDOWS32]: Declare variables 'const char *' to avoid compiler warnings. * job.c (construct_command_argv_internal) [!NDEBUG]: Declare 'end' and set it only if NDEBUG is not defined, to avoid compiler warnings.
Diffstat (limited to 'job.c')
-rw-r--r--job.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/job.c b/job.c
index d22e26c..6233026 100644
--- a/job.c
+++ b/job.c
@@ -2703,7 +2703,9 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
#endif
int i;
char *p;
+#ifndef NDEBUG
char *end;
+#endif
char *ap;
const char *cap;
const char *cp;
@@ -2807,7 +2809,9 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
/* All the args can fit in a buffer as big as LINE is. */
ap = new_argv[0] = argstr = xmalloc (i);
+#ifndef NDEBUG
end = ap + i;
+#endif
/* I is how many complete arguments have been found. */
i = 0;