diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-05-21 20:58:51 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-05-21 20:58:51 -0600 |
commit | d31cd71e5a3d73e20cfff89968c7b932d451f75c (patch) | |
tree | 264309197f0d847683df0ef960f87d5734c5f225 /pico | |
parent | 2e57dfe03e4df802d530ae217415d50419ab4e20 (diff) | |
download | alpine-d31cd71e5a3d73e20cfff89968c7b932d451f75c.tar.xz |
* Clear out some gcc warnings, and code improvement. Work in progress.
Diffstat (limited to 'pico')
-rw-r--r-- | pico/attach.c | 4 | ||||
-rw-r--r-- | pico/browse.c | 2 | ||||
-rw-r--r-- | pico/file.c | 4 | ||||
-rw-r--r-- | pico/line.c | 2 | ||||
-rw-r--r-- | pico/osdep/altedit.c | 2 | ||||
-rw-r--r-- | pico/osdep/shell.c | 2 | ||||
-rw-r--r-- | pico/osdep/signals.c | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/pico/attach.c b/pico/attach.c index 35cee679..b05edb0c 100644 --- a/pico/attach.c +++ b/pico/attach.c @@ -435,7 +435,7 @@ SyncAttach(void) comment[1024]; struct hdr_line *lp; /* current line in header */ struct headerentry *entry; - PATMT *tp, **knwn = NULL, **bld; + PATMT *tp, **knwn = NULL, **bld = NULL; EML eml; if(Pmaster == NULL) @@ -650,7 +650,7 @@ ParseAttach(struct hdr_line **lp, /* current header line */ size_t cmntlen, int *no) /* attachment number */ { - int j, status, bod, eod = -1, + int j = 0, status, bod, eod = -1, rv = 0, /* return value */ orig_offset, lbln = 0, /* label'd attachment */ diff --git a/pico/browse.c b/pico/browse.c index 7f59274d..595185f1 100644 --- a/pico/browse.c +++ b/pico/browse.c @@ -1823,7 +1823,7 @@ getfcells(char *dname, int fb_flags) **filtnames, /* array filtered names */ errbuf[NLINE]; struct fcell *ncp, /* new cell pointer */ - *tcp; /* trailing cell ptr */ + *tcp = NULL; /* trailing cell ptr */ struct bmaster *mp; EML eml; diff --git a/pico/file.c b/pico/file.c index 7aae2cf7..9d561ec9 100644 --- a/pico/file.c +++ b/pico/file.c @@ -113,7 +113,7 @@ insfile(int f, int n) { register int s; char fname[NLINE], dir[NLINE]; - int retval, bye = 0, msg = 0; + int retval = 0, bye = 0, msg = 0; char prompt[64], *infile; EXTRAKEYS menu_ins[10]; EML eml; @@ -1016,7 +1016,7 @@ int pico_fncomplete(char *dirarg, char *fn, size_t fnlen) { char *p, *dlist, tmp[NLINE], dir[NLINE]; - int n, i, match = -1, orign; + int n, i, match = -1, orign = 0; #ifdef DOS #define FILECMP(x, y) (toupper((unsigned char)(x))\ == toupper((unsigned char)(y))) diff --git a/pico/line.c b/pico/line.c index c06c3ed5..a2289280 100644 --- a/pico/line.c +++ b/pico/line.c @@ -70,7 +70,7 @@ long pkbufremove(int, struct pkbuf *); LINE * lalloc(int used) { - register LINE *lp; + register LINE *lp = NULL; register int size; EML eml; static int displayed = 0; diff --git a/pico/osdep/altedit.c b/pico/osdep/altedit.c index d8717588..e8cc80c4 100644 --- a/pico/osdep/altedit.c +++ b/pico/osdep/altedit.c @@ -109,7 +109,7 @@ alt_editor(int f, int n) if(Pmaster->alt_ed){ char **lp, *wsp, *path, fname[MAXPATH+1]; - int c; + int c = '\0'; for(lp = Pmaster->alt_ed; *lp && **lp; lp++){ if((wsp = strpbrk(*lp, " \t")) != NULL){ diff --git a/pico/osdep/shell.c b/pico/osdep/shell.c index c22e9176..7554fdb8 100644 --- a/pico/osdep/shell.c +++ b/pico/osdep/shell.c @@ -98,7 +98,7 @@ bktoshell(int f, int n) if(gmode&MDSPWN){ char *shell; - int dummy; + int dummy = 1; vttidy(); movecursor(0, 0); diff --git a/pico/osdep/signals.c b/pico/osdep/signals.c index 6886e5c0..00a96902 100644 --- a/pico/osdep/signals.c +++ b/pico/osdep/signals.c @@ -103,7 +103,7 @@ do_hup_signal(int sig) RETSIGTYPE winch_handler(int sig) { - int i; + int i = 0; signal(SIGWINCH, winch_handler); if(wheadp != NULL) ttresize(); |