summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-07-26 14:15:58 -0600
committerEduardo Chappa <chappa@washington.edu>2015-07-26 14:15:58 -0600
commit36b77661542a63c4579943951d143c8cc9c99460 (patch)
tree07858a2130d5d46ac7eef9587e09be8080e43a3d /pith
parent7c946bfafe961c1dda51d19b5c29a5600ef1e5ec (diff)
downloadalpine-36b77661542a63c4579943951d143c8cc9c99460.tar.xz
* several changes to reduce warnings, including adding sys/ioctl.h
in system.h.
Diffstat (limited to 'pith')
-rw-r--r--pith/conf.c9
-rw-r--r--pith/folder.c6
-rw-r--r--pith/msgno.c2
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/reply.c4
-rw-r--r--pith/smime.c2
-rw-r--r--pith/stream.c4
7 files changed, 15 insertions, 14 deletions
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 =================
<HTML>
<HEAD>
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);