Fix up some silly warnings
This commit is contained in:
parent
5f265b755a
commit
cfa88ecb72
6
hush.c
6
hush.c
@ -244,7 +244,7 @@ static char map[256];
|
|||||||
static int fake_mode=0;
|
static int fake_mode=0;
|
||||||
static int interactive=0;
|
static int interactive=0;
|
||||||
static struct close_me *close_me_head = NULL;
|
static struct close_me *close_me_head = NULL;
|
||||||
static char *cwd;
|
static const char *cwd;
|
||||||
static struct jobset *job_list;
|
static struct jobset *job_list;
|
||||||
static unsigned int last_bg_pid=0;
|
static unsigned int last_bg_pid=0;
|
||||||
static char *PS1;
|
static char *PS1;
|
||||||
@ -428,7 +428,7 @@ static int builtin_cd(struct child_prog *child)
|
|||||||
printf("cd: %s: %s\n", newdir, strerror(errno));
|
printf("cd: %s: %s\n", newdir, strerror(errno));
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
@ -569,7 +569,7 @@ static int builtin_jobs(struct child_prog *child)
|
|||||||
/* built-in 'pwd' handler */
|
/* built-in 'pwd' handler */
|
||||||
static int builtin_pwd(struct child_prog *dummy)
|
static int builtin_pwd(struct child_prog *dummy)
|
||||||
{
|
{
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
puts(cwd);
|
puts(cwd);
|
||||||
|
6
lash.c
6
lash.c
@ -216,7 +216,7 @@ unsigned int shell_context; /* Used in cmdedit.c to reset the
|
|||||||
|
|
||||||
|
|
||||||
/* Globals that are static to this file */
|
/* Globals that are static to this file */
|
||||||
static char *cwd;
|
static const char *cwd;
|
||||||
static char *local_pending_command = NULL;
|
static char *local_pending_command = NULL;
|
||||||
static struct jobset job_list = { NULL, NULL };
|
static struct jobset job_list = { NULL, NULL };
|
||||||
static int argc;
|
static int argc;
|
||||||
@ -296,7 +296,7 @@ static int builtin_cd(struct child_prog *child)
|
|||||||
printf("cd: %s: %m\n", newdir);
|
printf("cd: %s: %m\n", newdir);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
@ -413,7 +413,7 @@ static int builtin_jobs(struct child_prog *child)
|
|||||||
/* built-in 'pwd' handler */
|
/* built-in 'pwd' handler */
|
||||||
static int builtin_pwd(struct child_prog *dummy)
|
static int builtin_pwd(struct child_prog *dummy)
|
||||||
{
|
{
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
printf( "%s\n", cwd);
|
printf( "%s\n", cwd);
|
||||||
|
@ -244,7 +244,7 @@ static char map[256];
|
|||||||
static int fake_mode=0;
|
static int fake_mode=0;
|
||||||
static int interactive=0;
|
static int interactive=0;
|
||||||
static struct close_me *close_me_head = NULL;
|
static struct close_me *close_me_head = NULL;
|
||||||
static char *cwd;
|
static const char *cwd;
|
||||||
static struct jobset *job_list;
|
static struct jobset *job_list;
|
||||||
static unsigned int last_bg_pid=0;
|
static unsigned int last_bg_pid=0;
|
||||||
static char *PS1;
|
static char *PS1;
|
||||||
@ -428,7 +428,7 @@ static int builtin_cd(struct child_prog *child)
|
|||||||
printf("cd: %s: %s\n", newdir, strerror(errno));
|
printf("cd: %s: %s\n", newdir, strerror(errno));
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
@ -569,7 +569,7 @@ static int builtin_jobs(struct child_prog *child)
|
|||||||
/* built-in 'pwd' handler */
|
/* built-in 'pwd' handler */
|
||||||
static int builtin_pwd(struct child_prog *dummy)
|
static int builtin_pwd(struct child_prog *dummy)
|
||||||
{
|
{
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
puts(cwd);
|
puts(cwd);
|
||||||
|
@ -216,7 +216,7 @@ unsigned int shell_context; /* Used in cmdedit.c to reset the
|
|||||||
|
|
||||||
|
|
||||||
/* Globals that are static to this file */
|
/* Globals that are static to this file */
|
||||||
static char *cwd;
|
static const char *cwd;
|
||||||
static char *local_pending_command = NULL;
|
static char *local_pending_command = NULL;
|
||||||
static struct jobset job_list = { NULL, NULL };
|
static struct jobset job_list = { NULL, NULL };
|
||||||
static int argc;
|
static int argc;
|
||||||
@ -296,7 +296,7 @@ static int builtin_cd(struct child_prog *child)
|
|||||||
printf("cd: %s: %m\n", newdir);
|
printf("cd: %s: %m\n", newdir);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
@ -413,7 +413,7 @@ static int builtin_jobs(struct child_prog *child)
|
|||||||
/* built-in 'pwd' handler */
|
/* built-in 'pwd' handler */
|
||||||
static int builtin_pwd(struct child_prog *dummy)
|
static int builtin_pwd(struct child_prog *dummy)
|
||||||
{
|
{
|
||||||
cwd = xgetcwd(cwd);
|
cwd = xgetcwd((char *)cwd);
|
||||||
if (!cwd)
|
if (!cwd)
|
||||||
cwd = unknown;
|
cwd = unknown;
|
||||||
printf( "%s\n", cwd);
|
printf( "%s\n", cwd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user