summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-12-27 18:04:05 +0000
committerjilles <jilles@FreeBSD.org>2009-12-27 18:04:05 +0000
commit5e8a2136e77b00534434ca09013b82b54a34e781 (patch)
tree460140e6f2859387224bc3cf5cc7148cf75b3745 /bin/sh/jobs.c
parent6d0737d0cb83394edfef580d58950553333a6cc1 (diff)
downloadFreeBSD-src-5e8a2136e77b00534434ca09013b82b54a34e781.zip
FreeBSD-src-5e8a2136e77b00534434ca09013b82b54a34e781.tar.gz
sh: Various warning fixes (from WARNS=6 NO_WERROR=1):
- const - initializations to silence -Wuninitialized (it was safe anyway) - remove nested extern declarations - rename "index" locals to "idx"
Diffstat (limited to 'bin/sh/jobs.c')
-rw-r--r--bin/sh/jobs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 95ec6e2..6ba951c 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -92,7 +92,7 @@ STATIC struct job *getjob(char *);
STATIC pid_t dowait(int, struct job *);
STATIC pid_t waitproc(int, int *);
STATIC void cmdtxt(union node *);
-STATIC void cmdputs(char *);
+STATIC void cmdputs(const char *);
#if JOBS
STATIC void setcurjob(struct job *);
STATIC void deljob(struct job *);
@@ -1083,7 +1083,7 @@ cmdtxt(union node *n)
{
union node *np;
struct nodelist *lp;
- char *p;
+ const char *p;
int i;
char s[2];
@@ -1212,9 +1212,10 @@ redir:
STATIC void
-cmdputs(char *s)
+cmdputs(const char *s)
{
- char *p, *q;
+ const char *p;
+ char *q;
char c;
int subtype = 0;
OpenPOWER on IntegriCloud