From 36b77661542a63c4579943951d143c8cc9c99460 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 26 Jul 2015 14:15:58 -0600 Subject: * several changes to reduce warnings, including adding sys/ioctl.h in system.h. --- pith/conf.c | 9 +++++---- pith/folder.c | 6 +++--- pith/msgno.c | 2 +- pith/pine.hlp | 2 +- pith/reply.c | 4 ++-- pith/smime.c | 2 +- pith/stream.c | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-) (limited to 'pith') diff --git a/pith/conf.c b/pith/conf.c index 7f450be8..40fdbcdb 100644 --- a/pith/conf.c +++ b/pith/conf.c @@ -4690,8 +4690,8 @@ set_news_spec_current_val(int expand, int cmdline) char buf[MAXPATH]; newsvar->global_val.l = (char **)fs_get(2 * sizeof(char *)); - snprintf(buf, sizeof(buf), "{%.*s/nntp}#news.[]", sizeof(buf)-20, - ps_global->VAR_NNTP_SERVER[0]); + snprintf(buf, sizeof(buf), "{%.*s/nntp}#news.[]", MAXPATH-20, + ps_global->VAR_NNTP_SERVER[0]); /* MAXPATH = sizeof(buf) */ newsvar->global_val.l[0] = cpystr(buf); newsvar->global_val.l[1] = NULL; set_current_val(newsvar, expand, cmdline); @@ -7627,9 +7627,10 @@ copy_localfile_to_remotefldr(RemType remotetype, char *local, char *remote, void panic1(char *message, char *arg) { - char buf1[1001], buf2[1001]; +#define SIZEOFBUF 1001 + char buf1[SIZEOFBUF], buf2[SIZEOFBUF]; - snprintf(buf1, sizeof(buf1), "%.*s", MAX(sizeof(buf1) - 1 - strlen(message), 0), arg); + snprintf(buf1, sizeof(buf1), "%.*s", MAX(SIZEOFBUF - 1 - strlen(message), 0), arg); snprintf(buf2, sizeof(buf2), message, buf1); alpine_panic(buf2); } diff --git a/pith/folder.c b/pith/folder.c index 63f1b1d8..774838a9 100644 --- a/pith/folder.c +++ b/pith/folder.c @@ -1407,7 +1407,7 @@ unsigned char *folder_name_decoded(unsigned char *mailbox) { unsigned char *s; s = (unsigned char *) utf8_from_mutf7((unsigned char *) mailbox); - if (s == NULL) s = (unsigned char *) cpystr(mailbox); + if (s == NULL) s = (unsigned char *) cpystr((char *)mailbox); return s; } @@ -1417,8 +1417,8 @@ unsigned char *folder_name_decoded(unsigned char *mailbox) unsigned char *folder_name_encoded(unsigned char *mailbox) { unsigned char *s; - s = (char *) utf8_to_mutf7(mailbox); - if (s == NULL) s = cpystr(mailbox); + if ((s = utf8_to_mutf7(mailbox)) == NULL) + s = (unsigned char *) cpystr((char *) mailbox); return s; } diff --git a/pith/msgno.c b/pith/msgno.c index e1dd2f35..91b53e12 100644 --- a/pith/msgno.c +++ b/pith/msgno.c @@ -271,7 +271,7 @@ msgno_exclude_deleted(MAILSTREAM *stream, MSGNO_S *msgs, char *sequence) (void) count_flagged(stream, F_DEL); if(sequence) - mail_sequence (stream,sequence); + mail_sequence (stream,(unsigned char *) sequence); /* * Start with the end of the folder and work backwards so that diff --git a/pith/pine.hlp b/pith/pine.hlp index 6ce90a71..ee0a1bdd 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 83 2015-07-26 08:29:01 +Alpine Commit 84 2015-07-26 14:15:47 ============= h_news ================= diff --git a/pith/reply.c b/pith/reply.c index f60ce58f..834b945a 100644 --- a/pith/reply.c +++ b/pith/reply.c @@ -89,8 +89,8 @@ same_subject(char *s, char *t) len = i < j ? j : i; u = fs_get(6*len+1); v = fs_get(6*len+1); - s1 = (char *) rfc1522_decode_to_utf8(u, 6*len + 1, s); - s2 = (char *) rfc1522_decode_to_utf8(v, 6*len + 1, t); + s1 = (char *) rfc1522_decode_to_utf8((unsigned char *) u, 6*len + 1, s); + s2 = (char *) rfc1522_decode_to_utf8((unsigned char *) v, 6*len + 1, t); mail_strip_subject(s1, &u); mail_strip_subject(s2, &v); diff --git a/pith/smime.c b/pith/smime.c index 841a2743..77433a80 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -2841,7 +2841,7 @@ do_detached_signature_verify(BODY *b, long msgno, char *section) mail_free_envelope(&env); mail_free_body_part(&b->nested.part); - tmpB = mail_body_section(body, section); + tmpB = mail_body_section(body, (unsigned char *) section); if(MIME_MSG(tmpB->type, tmpB->subtype)) b->nested.part = tmpB->nested.msg->body->nested.part; else diff --git a/pith/stream.c b/pith/stream.c index cfdcc9a5..5cce21ce 100644 --- a/pith/stream.c +++ b/pith/stream.c @@ -3276,13 +3276,13 @@ streams_died(void) folder = folder_name_decoded((unsigned char *)STREAMNAME(m)); q_status_message1(SM_ORDER | SM_DING, 3, 3, _("MAIL FOLDER \"%s\" CLOSED DUE TO ACCESS ERROR"), - short_str(pretty_fn(folder) ? pretty_fn(folder) : "?", + short_str(pretty_fn((char *) folder) ? pretty_fn((char *) folder) : "?", tmp_20k_buf+1000, SIZEOF_20KBUF-1000, 35, FrontDots)); dprint((6, "streams_died: locked: \"%s\"\n", folder)); if(rv == 1){ snprintf(tmp_20k_buf, SIZEOF_20KBUF, _("Folder \"%s\" is Closed"), - short_str(pretty_fn(folder) ? pretty_fn(folder) : "?", + short_str(pretty_fn((char *)folder) ? pretty_fn((char *)folder) : "?", tmp_20k_buf+1000, SIZEOF_20KBUF-1000, 35, FrontDots)); if(pith_opt_icon_text) (*pith_opt_icon_text)(tmp_20k_buf, IT_MCLOSED); -- cgit v1.2.3-70-g09d2