summaryrefslogtreecommitdiffstats
path: root/bin/sh/exec.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-04-01 17:18:22 +0000
committerjilles <jilles@FreeBSD.org>2013-04-01 17:18:22 +0000
commit3deb97fc0b145c3f68e924fbc0d4c173749860fd (patch)
tree9a5917477e371894a700d8481509e110a980c3bd /bin/sh/exec.c
parentf09dcb3ac2cf988f73865370bf0a644a3905b5b2 (diff)
downloadFreeBSD-src-3deb97fc0b145c3f68e924fbc0d4c173749860fd.zip
FreeBSD-src-3deb97fc0b145c3f68e924fbc0d4c173749860fd.tar.gz
sh: Fix various compiler warnings.
It now passes WARNS=7 with clang on i386. GCC 4.2.1 does not understand setjmp() properly so will always trigger -Wuninitialized. I will not add the volatile keywords to suppress this.
Diffstat (limited to 'bin/sh/exec.c')
-rw-r--r--bin/sh/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/exec.c b/bin/sh/exec.c
index 7a6dbae..6c3a6dd 100644
--- a/bin/sh/exec.c
+++ b/bin/sh/exec.c
@@ -165,7 +165,7 @@ tryexec(char *cmd, char **argv, char **envp)
}
}
*argv = cmd;
- *--argv = _PATH_BSHELL;
+ *--argv = __DECONST(char *, _PATH_BSHELL);
execve(_PATH_BSHELL, argv, envp);
}
errno = e;
@@ -188,7 +188,7 @@ padvance(const char **path, const char *name)
{
const char *p, *start;
char *q;
- int len;
+ size_t len;
if (*path == NULL)
return NULL;
OpenPOWER on IntegriCloud