summaryrefslogtreecommitdiffstats
path: root/bin/sh/histedit.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/histedit.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/histedit.c')
-rw-r--r--bin/sh/histedit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 8240a96..cdde09a 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -164,19 +164,19 @@ int
histcmd(int argc, char **argv)
{
int ch;
- char *editor = NULL;
+ const char *editor = NULL;
HistEvent he;
int lflg = 0, nflg = 0, rflg = 0, sflg = 0;
int i, retval;
- char *firststr, *laststr;
+ const char *firststr, *laststr;
int first, last, direction;
- char *pat = NULL, *repl;
+ char *pat = NULL, *repl = NULL;
static int active = 0;
struct jmploc jmploc;
struct jmploc *savehandler;
char editfilestr[PATH_MAX];
char *volatile editfile;
- FILE *efp;
+ FILE *efp = NULL;
int oldhistnum;
if (hist == NULL)
OpenPOWER on IntegriCloud