diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-06-08 17:19:07 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-06-08 17:19:07 -0600 |
commit | d741ceda2bd53d15d48fc1b9c4d836a9016194a7 (patch) | |
tree | 65800837f16908a3ff6f6094311f74272e10af99 /pith | |
parent | a340c0ecbfb80335b11bd5d5c50d130ba86b2812 (diff) | |
download | alpine-d741ceda2bd53d15d48fc1b9c4d836a9016194a7.tar.xz |
* Remove some compilation warnings given by clang7.
Diffstat (limited to 'pith')
-rw-r--r-- | pith/filter.c | 14 | ||||
-rw-r--r-- | pith/ical.c | 2 | ||||
-rw-r--r-- | pith/pine.hlp | 2 | ||||
-rw-r--r-- | pith/send.c | 2 | ||||
-rw-r--r-- | pith/smime.c | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/pith/filter.c b/pith/filter.c index 1e2db4d1..0c2f5256 100644 --- a/pith/filter.c +++ b/pith/filter.c @@ -3228,7 +3228,7 @@ int html_code(HANDLER_S *, int, int); int html_ins(HANDLER_S *, int, int); int html_del(HANDLER_S *, int, int); int html_abbr(HANDLER_S *, int, int); -char *cid_tempfile_name(unsigned char *, long, int *); +char *cid_tempfile_name(char *, long, int *); /* * Protos for RSS 2.0 Tag handlers @@ -9057,7 +9057,7 @@ gf_html2plain_rss_free_items(RSS_ITEM_S **itemp) } char * -cid_tempfile_name(unsigned char *line, long n, int *is_cidp) +cid_tempfile_name(char *line, long n, int *is_cidp) { int f2 = 0; int i, found; @@ -9086,7 +9086,7 @@ cid_tempfile_name(unsigned char *line, long n, int *is_cidp) /* find the tmpdir where all these files will be saved to */ if(t == NULL){ for(i = 0; ps_global->atmts[i].tmpdir == NULL && ps_global->atmts[i].description != NULL; i++); - t = ps_global->atmts[i].description ? ps_global->atmts[i].tmpdir : NULL; + t = ps_global->atmts[i].description ? ps_global->atmts[i].tmpdir : NULL; } /* now we need to look for s in the list of attachments */ @@ -9156,7 +9156,7 @@ gf_html_cid2file(FILTER_S *f, int cmd) if (f->f2 == 1 && (c == 'i' || c == 'I')) f->f2 = 2; else if (f->f2 == 2 && (c == 'm' || c == 'M')) f->f2 = 3; else if (f->f2 == 3 && (c == 'g' || c == 'G')) f->f2 = 4; - else if (f->f2 == 4 && HTML_ISSPACE(c)){ f->f2 = 0; state = 1; } + else if (f->f2 == 4 && ASCII_ISSPACE(c)){ f->f2 = 0; state = 1; } else f->f2 = 0; } } @@ -9165,11 +9165,11 @@ gf_html_cid2file(FILTER_S *f, int cmd) else if (f->f2 == 1 && (c == 'r' || c == 'R')) f->f2 = 2; else if (f->f2 == 2 && (c == 'c' || c == 'C')) f->f2 = 3; else if (f->f2 == 3 && c == '='){ GF_PUTC(f->next, c); state = 2; } - else if (f->f2 == 3 && !HTML_ISSPACE(c)) f->f2 = 0; + else if (f->f2 == 3 && !ASCII_ISSPACE(c)) f->f2 = 0; else f->f2 = 0; } else if (state == 2){ /* collect all data */ - if(HTML_ISSPACE(c) || c == '>'){ + if(ASCII_ISSPACE(c) || c == '>'){ long n; int is_cid; if(f->n > 0){ @@ -9191,7 +9191,7 @@ gf_html_cid2file(FILTER_S *f, int cmd) else f->n = 0; GF_PUTC(f->next, '\"'); GF_PUTC(f->next, c); - state = HTML_ISSPACE(c) ? 1 : 0; + state = ASCII_ISSPACE(c) ? 1 : 0; RESET_FILTER(f); } else COLLECT(f, c); /* collect this data */ diff --git a/pith/ical.c b/pith/ical.c index 5079ceb9..2d61c00e 100644 --- a/pith/ical.c +++ b/pith/ical.c @@ -243,7 +243,7 @@ ical_decode(char *text, unsigned short encoding) t = rfc822_qprint ((unsigned char *) text,strlen(text),&callen); if(t != NULL){ tlen = strlen(text) + 1; - strncpy(text, t, tlen); + strncpy(text, (char *) t, tlen); text[tlen - 1] = '\0'; fs_give((void **) &t); } diff --git a/pith/pine.hlp b/pith/pine.hlp index d7af4f7f..08ef532d 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 435 2020-06-08 02:41:56 +Alpine Commit 436 2020-06-08 17:19:02 ============= h_news ================= <HTML> <HEAD> diff --git a/pith/send.c b/pith/send.c index 39295a9e..80db83f8 100644 --- a/pith/send.c +++ b/pith/send.c @@ -4297,7 +4297,7 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s) #ifdef SMIME if(ps_global->smime && ps_global->smime->do_sign && strlen(tmp) < sizeof(tmp)-2) - strncat(tmp, "\015\012", sizeof(tmp) - strlen(tmp)); + strncat(tmp, "\015\012", sizeof(tmp) - strlen(tmp) - 1); #endif if(lmc.so && !lmc.all_written){ so_puts(lmc.so, t); diff --git a/pith/smime.c b/pith/smime.c index 499264de..ccaf1066 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -478,7 +478,7 @@ smime_expunge_cert(WhichCerts ctype) if(SMHOLDERTYPE(ctype) == Directory){ build_path(buf, path, cl->next->name, sizeof(buf)); if(ctype == Private && strlen(buf) + strlen(EXTCERT(Private)) < sizeof(buf)){ - strncat(buf, EXTCERT(Private), sizeof(buf) - strlen(buf)); + strncat(buf, EXTCERT(Private), sizeof(buf) - strlen(buf)-1); buf[sizeof(buf)-1] = '\0'; } @@ -867,7 +867,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname) if(SMHOLDERTYPE(ctype) == Directory){ build_path(buf, PATHCERTDIR(ctype), filename, sizeof(buf)); if(strcmp(buf + strlen(buf) - 4, EXTCERT(ctype)) != 0 && strlen(buf) + 4 < sizeof(buf)){ - strncat(buf, EXTCERT(ctype), sizeof(buf) - strlen(buf)); + strncat(buf, EXTCERT(ctype), sizeof(buf) - strlen(buf) -1); buf[sizeof(buf)-1] = '\0'; } rc = our_copy(buf, full_filename); @@ -892,7 +892,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname) if(SMHOLDERTYPE(ctype) == Directory){ build_path(buf, PATHCERTDIR(ctype), filename, sizeof(buf)); if(strcmp(buf + strlen(buf) - 4, ".crt") != 0 && strlen(buf) + 4 < sizeof(buf)){ - strncat(buf, EXTCERT(ctype), sizeof(buf) - strlen(buf)); + strncat(buf, EXTCERT(ctype), sizeof(buf) - strlen(buf) - 1); buf[sizeof(buf)-1] = '\0'; } @@ -1345,7 +1345,7 @@ get_personal_certs(char *path) pc = (PERSONAL_CERT *) fs_get(sizeof(*pc)); pc->cert = cert; pc->name = cpystr(buf2); - strncat(buf2, EXTCERT(Public), sizeof(buf2) - strlen(buf2)); + strncat(buf2, EXTCERT(Public), sizeof(buf2) - strlen(buf2) - 1); pc->cname = cpystr(buf2); /* Try to load the key with an empty password */ |