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 | |
parent | 2e57dfe03e4df802d530ae217415d50419ab4e20 (diff) | |
download | alpine-d31cd71e5a3d73e20cfff89968c7b932d451f75c.tar.xz |
* Clear out some gcc warnings, and code improvement. Work in progress.
-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 | ||||
-rw-r--r-- | pith/abdlc.c | 8 | ||||
-rw-r--r-- | pith/bldaddr.c | 2 | ||||
-rw-r--r-- | pith/charconv/utf8.c | 2 | ||||
-rw-r--r-- | pith/charset.c | 2 | ||||
-rw-r--r-- | pith/conf.c | 12 | ||||
-rw-r--r-- | pith/copyaddr.c | 2 | ||||
-rw-r--r-- | pith/detoken.c | 2 | ||||
-rw-r--r-- | pith/flag.c | 8 | ||||
-rw-r--r-- | pith/folder.c | 6 | ||||
-rw-r--r-- | pith/ical.c | 2 | ||||
-rw-r--r-- | pith/keyword.c | 2 | ||||
-rw-r--r-- | pith/ldap.c | 5 | ||||
-rw-r--r-- | pith/mailindx.c | 4 | ||||
-rw-r--r-- | pith/mailview.c | 4 | ||||
-rw-r--r-- | pith/msgno.c | 4 | ||||
-rw-r--r-- | pith/news.c | 2 | ||||
-rw-r--r-- | pith/osdep/temp_nam.c | 2 | ||||
-rw-r--r-- | pith/pattern.c | 25 | ||||
-rw-r--r-- | pith/save.c | 8 | ||||
-rw-r--r-- | pith/send.c | 4 | ||||
-rw-r--r-- | pith/string.c | 4 | ||||
-rw-r--r-- | pith/takeaddr.c | 2 | ||||
-rw-r--r-- | pith/text.c | 4 | ||||
-rw-r--r-- | pith/thread.c | 2 |
31 files changed, 69 insertions, 67 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(); diff --git a/pith/abdlc.c b/pith/abdlc.c index 727c209b..f320c1c4 100644 --- a/pith/abdlc.c +++ b/pith/abdlc.c @@ -217,10 +217,10 @@ dlc_siblings(DL_CACHE_S *dlc1, DL_CACHE_S *dlc2) DL_CACHE_S * dlc_mgr(long int row, DlMgrOps op, DL_CACHE_S *dlc_start) { - int new_index, known_index, next_index; + int new_index, known_index, next_index = 0; DL_CACHE_S *dlc = (DL_CACHE_S *)NULL; - long next_row; - long prev_row; + long next_row = 0L; + long prev_row = 0L; if(op == Lookup){ @@ -1711,7 +1711,7 @@ fill_in_dl_field(DL_CACHE_S *new) hostbuf[0] = '\0'; folder = NULL; if(pab->type & REMOTE_VIA_IMAP && pab->filename){ - char *start, *end; + char *start, *end = NULL; start = strindex(pab->filename, '{'); if(start) diff --git a/pith/bldaddr.c b/pith/bldaddr.c index 7c028b93..3d22f895 100644 --- a/pith/bldaddr.c +++ b/pith/bldaddr.c @@ -472,7 +472,7 @@ expand_address(BuildTo to, char *userdomain, char *localdomain, int *loop_detect int simple_verify, int *mangled) { size_t domain_length, length; - ADDRESS *adr, *a, *a_tail, *adr2, *a2, *a_temp, *wp_a; + ADDRESS *adr, *a, *a_tail, *adr2 = NULL, *a2, *a_temp, *wp_a; AdrBk_Entry *abe, *abe2; char *list, *l1, **l2; char *tmp_a_string, *q; diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c index 42a364b3..6b1e2e9d 100644 --- a/pith/charconv/utf8.c +++ b/pith/charconv/utf8.c @@ -236,7 +236,7 @@ convert_to_utf8(char *str, char *fromcharset, int flags) char *ret = NULL; char *fcharset; SIZEDTEXT src, result; - const CHARSET *cs; + const CHARSET *cs = NULL; int try; src.data = (unsigned char *) str; diff --git a/pith/charset.c b/pith/charset.c index 387079a4..a5daa3fb 100644 --- a/pith/charset.c +++ b/pith/charset.c @@ -846,7 +846,7 @@ conversion_table(char *from_cs, char *to_cs) p = ct->table = (unsigned char *) fs_get(256 * sizeof(unsigned char)); for(i = 0; i < 256; i++){ - unsigned int fc; + unsigned int fc = 0; p[i] = '?'; switch(from->type){ /* get "from" UCS-2 codepoint */ case CT_1BYTE0: /* ISO 8859-1 */ diff --git a/pith/conf.c b/pith/conf.c index 8de54278..809dfe6d 100644 --- a/pith/conf.c +++ b/pith/conf.c @@ -1001,7 +1001,7 @@ init_init_vars(struct pine *ps) void init_pinerc(struct pine *ps, char **debug_out) { - char buf[MAXPATH+1], *p, *db; + char buf[MAXPATH+1], *p, *db = NULL; #if defined(DOS) || defined(OS2) char buf2[MAXPATH+1], l_pinerc[MAXPATH+1]; int nopinerc = 0, confregset = -1; @@ -5134,7 +5134,7 @@ Those that are <unset> will be left unset; their values will be NULL. void read_pinerc(PINERC_S *prc, struct variable *vars, ParsePinerc which_vars) { - char *filename, *file, *value, **lvalue, *line, *error; + char *filename = NULL, *file, *value = NULL, **lvalue = NULL, *line, *error; char *p, *p1, *free_file = NULL; struct variable *v; PINERC_LINE *pline = NULL; @@ -5644,14 +5644,14 @@ int write_pinerc(struct pine *ps, EditWhich which, int flags) { char *p, *dir, *tmp = NULL, *pinrc; - char *pval, **lval; + char *pval = NULL, **lval = NULL; char *linep = NULL, *lineq = NULL; int bc = 1; int buflen; PINERC_LINE *pline; struct variable *var; time_t mtime; - char *filename; + char *filename = NULL; REMDATA_S *rd = NULL; PINERC_S *prc = NULL; STORE_S *so = NULL; @@ -6532,7 +6532,7 @@ set_variable(int var, char *value, int expand, int commit, EditWhich which) { struct variable *v; char **apval; - PINERC_S *prc; + PINERC_S *prc = NULL; v = &ps_global->vars[var]; @@ -6590,7 +6590,7 @@ set_variable_list(int var, char **lvalue, int write_it, EditWhich which) char ***alval; int i; struct variable *v = &ps_global->vars[var]; - PINERC_S *prc; + PINERC_S *prc = NULL; if(!v->is_user || !v->is_list) panic1("BOTCH: Trying to set non-user or non-list variable %s", v->name); diff --git a/pith/copyaddr.c b/pith/copyaddr.c index 8604509a..a89c9eca 100644 --- a/pith/copyaddr.c +++ b/pith/copyaddr.c @@ -55,7 +55,7 @@ copyaddr(struct mail_address *a) ADDRESS * copyaddrlist(struct mail_address *a) { - ADDRESS *new = NULL, *head = NULL, *current; + ADDRESS *new = NULL, *head = NULL, *current = NULL; for(; a; a = a->next){ new = copyaddr(a); diff --git a/pith/detoken.c b/pith/detoken.c index cb4fc5f3..960876c8 100644 --- a/pith/detoken.c +++ b/pith/detoken.c @@ -144,7 +144,7 @@ detoken_src(char *src, int for_what, ENVELOPE *env, ACTION_S *role, REDRAFT_POS_S **redraft_pos, int *impl) { int loopcnt = 25; /* just in case, avoid infinite loop */ - char *ret, *str1, *str2; + char *ret = NULL, *str1, *str2; int done = 0; if(!src) diff --git a/pith/flag.c b/pith/flag.c index f9c2cb53..dab36cea 100644 --- a/pith/flag.c +++ b/pith/flag.c @@ -338,10 +338,8 @@ flag_search(MAILSTREAM *stream, int flags, MsgNo set_start, MSGNO_S *set_msgmap, (n = flag_search_sequence(stream, set_msgmap, i, MH_ANYTHD)) >= 0L; i++) if(n > 0L && n <= stream->nmsgs - && (mc = mail_elt(stream, n)) && !mc->valid) - mc->sequence = 1; - else - mc->sequence = 0; + && (mc = mail_elt(stream, n)) != NULL) + mc->sequence = !mc->valid ? 1 : 0; } for(i = 1L; i <= stream->nmsgs; i++) @@ -583,7 +581,7 @@ set_lflag(MAILSTREAM *stream, MSGNO_S *msgs, long int n, int f, int v) if((rawno=mn_m2raw(msgs, n)) > 0L && stream && rawno <= stream->nmsgs && (mc = mail_elt(stream, rawno))){ int was_invisible, is_invisible; - int chk_thrd_cnt = 0, thrd_was_visible, was_hidden, is_hidden; + int chk_thrd_cnt = 0, thrd_was_visible = 0, was_hidden = 0, is_hidden; if(*(peltp = (PINELT_S **) &mc->sparep) == NULL){ *peltp = (PINELT_S *) fs_get(sizeof(PINELT_S)); diff --git a/pith/folder.c b/pith/folder.c index 7382d8ac..8c286a42 100644 --- a/pith/folder.c +++ b/pith/folder.c @@ -1157,7 +1157,7 @@ mail_list_filter(MAILSTREAM *stream, char *mailbox, int delim, long int attribs, */ if(!strucmp(mailbox, ps_global->inbox_name)){ int ftotal, i; - FOLDER_S *f; + FOLDER_S *f = NULL; char fullname[1000], tmp1[1000], tmp2[1000], *l1, *l2; /* fullname is the name of the mailbox in the list response */ @@ -1549,7 +1549,7 @@ folder_complete_internal(CONTEXT_S *context, char *name, size_t namelen, int *completions, int flags) { int i, match = -1, ftotal; - char tmp[MAXFOLDER+2], *a, *b, *fn, *pat; + char tmp[MAXFOLDER+2], *a, *b, *fn, *pat = NULL; FOLDER_S *f; if(completions) @@ -2419,7 +2419,7 @@ get_recent_in_folder(char *mailbox_name, long unsigned int *new, MAILSTREAM *this_is_the_stream) { MAILSTREAM *strm = NIL; - unsigned long tot, nw, uns; + unsigned long tot = 0L, nw = 0L, uns = 0L; int gotit = 0; int maildrop = 0; char *target = NULL; diff --git a/pith/ical.c b/pith/ical.c index 7022bb55..1798d3fb 100644 --- a/pith/ical.c +++ b/pith/ical.c @@ -1677,7 +1677,7 @@ ical_non_ascii_valid(unsigned char c) static unsigned char icu[6]; static int utf8_len = 0; static int utf8_type = 0; - int rv; + int rv = 0; if(utf8_len == 0) utf8_type = (c >= 0xF0 && c <= 0xF4) diff --git a/pith/keyword.c b/pith/keyword.c index a8d9a429..006304bf 100644 --- a/pith/keyword.c +++ b/pith/keyword.c @@ -151,7 +151,7 @@ initial_to_keyword(char *initial) KEYWORD_S *kw; char *ret; int init; - int kwinit; + int kwinit = 0; ret = initial; if(initial[0] && initial[1] == '\0'){ diff --git a/pith/ldap.c b/pith/ldap.c index 8a351bc1..a091fc26 100644 --- a/pith/ldap.c +++ b/pith/ldap.c @@ -654,13 +654,14 @@ try_password_again: if(!tlsmustbail){ snprintf(pmt, sizeof(pmt), " %s", (info->nick && *info->nick) ? info->nick : serv); mm_login_work(&mb, user, &pwd, pwdtrial, pmt, info->binddn); - if(pwd && pwd[0]) + if(pwd && pwd[0]){ #ifdef _WINDOWS passwd = pwd; #else passwd.bv_len = strlen(pwd); passwd.bv_val = pwd; #endif + } } } @@ -709,7 +710,7 @@ try_password_again: dprint((2, "%s\n", ebuf)); } else if(!ps_global->intr_pending){ - int srch_res, args, slen, flen; + int srch_res = LDAP_SUCCESS, args, slen, flen; #define TEMPLATELEN 512 char filt_template[TEMPLATELEN + 1]; char filt_format[2*TEMPLATELEN + 1]; diff --git a/pith/mailindx.c b/pith/mailindx.c index 87cab265..918b3ddb 100644 --- a/pith/mailindx.c +++ b/pith/mailindx.c @@ -2009,7 +2009,7 @@ format_index_index_line(INDEXDATA_S *idata) int i, collapsed = 0, start, fromfield; long l, score; BODY *body = NULL; - MESSAGECACHE *mc; + MESSAGECACHE *mc = NULL; ADDRESS *addr, *toaddr, *ccaddr, *last_to; PINETHRD_S *thrd = NULL; INDEX_COL_S *cdesc = NULL; @@ -3741,7 +3741,7 @@ fetch_firsttext(INDEXDATA_S *idata, int delete_quotes) long partial_fetch_len = 0L; SEARCHSET *ss, **sset; MESSAGECACHE *mc; - PINELT_S *pelt; + PINELT_S *pelt = NULL; /* we cache the result we get from this function, so that we do not have to * refetch the text in case there is a change. We could cache in the envelope diff --git a/pith/mailview.c b/pith/mailview.c index 97f65587..dc0c49b1 100644 --- a/pith/mailview.c +++ b/pith/mailview.c @@ -156,7 +156,7 @@ format_message(long int msgno, ENVELOPE *env, struct mail_bodystruct *body, { char *decode_err = NULL; HEADER_S h; - int width, rv; + int width, rv = 0; clear_cur_embedded_color(); @@ -2911,7 +2911,7 @@ void format_addr_string(MAILSTREAM *stream, long int msgno, char *section, char *field_name, struct mail_address *addr, int flags, char *oacs, gf_io_t pc) { - char *ptmp, *mtmp; + char *ptmp, *mtmp = NULL; int trailing = 0, group = 0; ADDRESS *atmp; diff --git a/pith/msgno.c b/pith/msgno.c index 3d9b8719..d4a4e7b7 100644 --- a/pith/msgno.c +++ b/pith/msgno.c @@ -617,8 +617,8 @@ msgno_in_select(MSGNO_S *msgs, long int n) int msgno_exceptions(MAILSTREAM *stream, long int rawno, char *part, int *bits, int set) { - PINELT_S **peltp; - PARTEX_S **partp; + PINELT_S **peltp = NULL; + PARTEX_S **partp = NULL; MESSAGECACHE *mc; if(!stream || rawno < 1L || rawno > stream->nmsgs) diff --git a/pith/news.c b/pith/news.c index 06dfddf6..c24e8014 100644 --- a/pith/news.c +++ b/pith/news.c @@ -116,7 +116,7 @@ news_grouper(char *given_group, char **expanded_group, char **error, { char ng_error[90], *p1, *p2, *name, *end, *ep, **server, ng_ref[MAILTMPLEN]; - int expanded_len = 0, num_in_error = 0, cnt_errs; + int expanded_len = 0, num_in_error = 0, cnt_errs = 0; MAILSTREAM *stream = NULL; struct ng_list { diff --git a/pith/osdep/temp_nam.c b/pith/osdep/temp_nam.c index 2718f140..21aa0f26 100644 --- a/pith/osdep/temp_nam.c +++ b/pith/osdep/temp_nam.c @@ -235,7 +235,7 @@ char * temp_nam_ext(char *dir, char *prefix, char *ext) { struct stat buf; - size_t l, ll; + size_t l = 0, ll; char *f, *name; if(ext == NULL) diff --git a/pith/pattern.c b/pith/pattern.c index 1a02fd0a..d5efae86 100644 --- a/pith/pattern.c +++ b/pith/pattern.c @@ -511,7 +511,7 @@ sub_open_any_patterns(long int rflags) { PAT_LINE_S *patline = NULL, *pl = NULL; char **t = NULL; - struct variable *var; + struct variable *var = NULL; SET_PATTYPE(rflags); @@ -1478,7 +1478,7 @@ parse_patgrp_slash(char *str, PATGRP_S *patgrp) SET_STATUS(str,"/BOY=",patgrp->stat_boy); } else{ - char save; + char save = '\0';; patgrp->bogus = 1; @@ -1781,7 +1781,7 @@ parse_action_slash(char *str, ACTION_S *action) } } else{ - char save; + char save = '\0'; action->bogus = 1; @@ -1819,7 +1819,7 @@ parse_intvl(char *str) { char *q; long left, right; - INTVL_S *ret = NULL, **next; + INTVL_S *ret = NULL, **next = NULL; if(!str) return(ret); @@ -3329,7 +3329,7 @@ sub_write_patterns(long int rflags) free_list_array(&lvalue); else{ char ***alval; - struct variable *var; + struct variable *var = NULL; if(rflags & ROLE_DO_ROLES) var = &ps_global->vars[V_PAT_ROLES]; @@ -3557,7 +3557,7 @@ data_for_patline(PAT_S *pat) *keyword_set = NULL, *keyword_clr = NULL; int to_not = 0, news_not = 0, from_not = 0, sender_not = 0, cc_not = 0, subj_not = 0, - partic_not = 0, recip_not = 0, alltext_not, bodytext_not, + partic_not = 0, recip_not = 0, alltext_not = 0, bodytext_not = 0, keyword_not = 0, charset_not = 0; size_t l; ACTION_S *action = NULL; @@ -4833,11 +4833,14 @@ match_pattern(PATGRP_S *patgrp, MAILSTREAM *stream, SEARCHSET *searchset, /* we searched without the not, reverse it */ if(not && is_imap_stream(stream) && !modern_imap_stream(stream)){ for(msgno = 1L; msgno < mn_get_total(sp_msgmap(stream)); msgno++) - if(stream && msgno && msgno <= stream->nmsgs - && (mc=mail_elt(stream,msgno)) && mc->searched) - mc->searched = NIL; - else - mc->searched = T; + if(stream && msgno && msgno <= stream->nmsgs){ + if((mc=mail_elt(stream,msgno)) != NULL){ + if(mc->searched) + mc->searched = NIL; + else + mc->searched = T; + } + } } /* check scores */ diff --git a/pith/save.c b/pith/save.c index 5f2c14d6..96a8d989 100644 --- a/pith/save.c +++ b/pith/save.c @@ -132,7 +132,7 @@ save_get_fldr_from_env(char *fbuf, int nfbuf, ENVELOPE *e, struct pine *state, char fakedomain[2]; ADDRESS *tmp_adr = NULL; char buf[MAX(MAXFOLDER,MAX_NICKNAME) + 1]; - char *bufp; + char *bufp = NULL; char *folder_name = NULL; static char botch[] = "programmer botch, unknown message save rule"; unsigned save_msg_rule; @@ -425,7 +425,7 @@ save(struct pine *state, MAILSTREAM *stream, CONTEXT_S *context, char *folder, int delete, filter, k, worry_about_keywords = 0; char *save_folder, *seq, *flags = NULL, date[64], tmp[MAILTMPLEN]; long i, nmsgs, rawno; - size_t len; + size_t len = 0; STORE_S *so = NULL; MAILSTREAM *save_stream = NULL; MESSAGECACHE *mc; @@ -504,7 +504,7 @@ save(struct pine *state, MAILSTREAM *stream, CONTEXT_S *context, char *folder, if(dstn_stream && dstn_stream->kwd_create){ imapuid_t dummy_uid = 0L; - long dummy_msgno, delete_count; + long dummy_msgno = 0L, delete_count; int expbits, set; char *flags = NULL; char *user_flag_name, *duser_flag_name; @@ -564,7 +564,7 @@ save(struct pine *state, MAILSTREAM *stream, CONTEXT_S *context, char *folder, char dummymsg[1000]; char *id = NULL; char *idused; - appenduid_t *au; + appenduid_t *au = NULL; newlen = strlen("\\DELETED"); len += newlen; diff --git a/pith/send.c b/pith/send.c index 1ce74fd8..d026e856 100644 --- a/pith/send.c +++ b/pith/send.c @@ -1876,7 +1876,7 @@ call_mailer(METAENV *header, struct mail_bodystruct *body, char **alt_smtp_serve TIME_STAMP("smtp open", 1); if(sending_stream){ - unsigned short save_encoding, added_encoding; + unsigned short save_encoding = 0, added_encoding = 0; dprint((1, "Opened SMTP server \"%s\"\n", net_host(sending_stream->netstream) @@ -3634,7 +3634,7 @@ posting_characterset(void *data, char *preferred_charset, MsgPart mp) if(mp == HdrText){ char *text = NULL; - UCS *ucs = NULL, *ucsp; + UCS *ucs = NULL, *ucsp = NULL; text = (char *) data; diff --git a/pith/string.c b/pith/string.c index d2d0d758..fe35857c 100644 --- a/pith/string.c +++ b/pith/string.c @@ -392,7 +392,7 @@ char * short_str(char *src, char *buf, size_t buflen, int wid, WhereDots where) { char *ans; - unsigned alen, first, second; + unsigned alen, first = 0, second = 0; if(wid <= 0){ ans = buf; @@ -1589,7 +1589,7 @@ fold(char *src, int width, int maxwidth, char *first_indent, char *indent, unsig } if(winner == -1 && (flags & FLD_NEXTSPC)){ - for(i = starting_point; winner == -1 && i <= strlen(next_piece) != '\0' && i < 512; i++){ + for(i = starting_point; winner == -1 && (i <= strlen(next_piece)) != '\0' && i < 512; i++){ endptr = utf8_count_forw_width(next_piece, i, &got_width); if(endptr && got_width == i && isspace((unsigned char) *endptr)) winner = (int) i; diff --git a/pith/takeaddr.c b/pith/takeaddr.c index 64338ff7..447a12e3 100644 --- a/pith/takeaddr.c +++ b/pith/takeaddr.c @@ -529,7 +529,7 @@ set_up_takeaddr(int cmd, struct pine *ps, MSGNO_S *msgmap, TA_S **ta_ret, int *selected_num, int flags, int (*att_addr_f)(TA_S *, int)) { long i; - ENVELOPE *env; + ENVELOPE *env = NULL; int how_many_selected = 0, added, rtype = 0, we_cancel = 0, diff --git a/pith/text.c b/pith/text.c index 6d256420..1d3f1d90 100644 --- a/pith/text.c +++ b/pith/text.c @@ -570,7 +570,7 @@ delete_quotes(long int linenum, char *line, LT_INS_S **ins, void *local) DELQ_S *dq; char *lp; int i, lines, not_a_quote = 0; - size_t len; + size_t len = 0; dq = (DELQ_S *) local; if(!dq) @@ -800,7 +800,7 @@ int replace_quotes(long int linenum, char *line, LT_INS_S **ins, void *local) { char *lp = line, *prefix = NULL, *last_prefix = NULL; - int no_more_quotes = 0, len, saw_quote = 0; + int no_more_quotes = 0, len = 0, saw_quote = 0; if(ps_global->VAR_QUOTE_REPLACE_STRING){ get_pair(ps_global->VAR_QUOTE_REPLACE_STRING, &prefix, &last_prefix, 0, 0); diff --git a/pith/thread.c b/pith/thread.c index a4e4c3ff..fedd5906 100644 --- a/pith/thread.c +++ b/pith/thread.c @@ -720,7 +720,7 @@ PINETHRD_S * msgno_thread_info(MAILSTREAM *stream, long unsigned int rawno, PINETHRD_S *attached_to_thrd, unsigned int flags) { - PINELT_S **peltp; + PINELT_S **peltp = NULL; MESSAGECACHE *mc; if(!stream || rawno < 1L || rawno > stream->nmsgs) |