diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-06-06 18:02:28 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-06-06 18:02:28 -0600 |
commit | ea54909c67de2589e6632efb25550814a2fc2411 (patch) | |
tree | ae36e8f3e6fad73624eadd681d5dab5996a94744 | |
parent | e10411bf0ecb248b65ca83882e945e15f906a6d4 (diff) | |
download | alpine-ea54909c67de2589e6632efb25550814a2fc2411.tar.xz |
* Clear some warnings given by gcc-10.
-rw-r--r-- | imap/src/c-client/utf8.c | 4 | ||||
-rw-r--r-- | imap/src/osdep/nt/env_nt.c | 2 | ||||
-rw-r--r-- | imap/src/osdep/unix/ckp_psx.c | 2 | ||||
-rw-r--r-- | imap/src/osdep/unix/dummy.c | 7 | ||||
-rw-r--r-- | imap/src/osdep/unix/unix.c | 12 |
5 files changed, 15 insertions, 12 deletions
diff --git a/imap/src/c-client/utf8.c b/imap/src/c-client/utf8.c index ffecf753..be03bd10 100644 --- a/imap/src/c-client/utf8.c +++ b/imap/src/c-client/utf8.c @@ -339,7 +339,7 @@ static const CHARSET utf8_csvalid[] = { NIL,SC_UNICODE,"UTF-8"}, {"UTF-16",CT_UTF16,CF_PRIMARY | CF_DISPLAY | CF_NOEMAIL, NIL,SC_UNICODE,"UTF-8"}, - NIL + {NIL, NIL, NIL, NIL, NIL, NIL} }; /* Non-Unicode Script table */ @@ -366,7 +366,7 @@ static const SCRIPT utf8_scvalid[] = { {"Latin-10","Balkan",SC_LATIN_10}, {"Thai",NIL,SC_THAI}, {"Vietnamese",NIL,SC_VIETNAMESE}, - NIL + {NIL, NIL, NIL} }; /* Look up script name or return entire table diff --git a/imap/src/osdep/nt/env_nt.c b/imap/src/osdep/nt/env_nt.c index 9db8a653..91d79c3f 100644 --- a/imap/src/osdep/nt/env_nt.c +++ b/imap/src/osdep/nt/env_nt.c @@ -186,7 +186,7 @@ static void do_date (char *date,char *prefix,char *fmt,int suffix) * -1 local time is 1 day behind UTC, offset -24 hours * -36x local time is January 1, UTC is December 31, offset +24 hours */ - if (julian = t->tm_yday -julian) + if ((julian = t->tm_yday -julian) != 0) zone += ((julian < 0) == (abs (julian) == 1)) ? -24*60 : 24*60; if (prefix) { /* want day of week? */ sprintf (date,prefix,days[t->tm_wday]); diff --git a/imap/src/osdep/unix/ckp_psx.c b/imap/src/osdep/unix/ckp_psx.c index 0f425bd3..6c095730 100644 --- a/imap/src/osdep/unix/ckp_psx.c +++ b/imap/src/osdep/unix/ckp_psx.c @@ -53,7 +53,7 @@ struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[]) * -1 local time is 1 day behind UTC, offset -24 hours * -36x local time is January 1, UTC is December 31, offset +24 hours */ - if (julian = t->tm_yday -julian) + if ((julian = t->tm_yday -julian) != 0) zone += ((julian < 0) == (abs (julian) == 1)) ? -24*60 : 24*60; /* days since 1/1/1970 local time */ now = ((now /60) + zone) / (60*24); diff --git a/imap/src/osdep/unix/dummy.c b/imap/src/osdep/unix/dummy.c index 660c916a..4c57c094 100644 --- a/imap/src/osdep/unix/dummy.c +++ b/imap/src/osdep/unix/dummy.c @@ -724,8 +724,11 @@ long dummy_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data) /* append to INBOX? */ if (!compare_cstring (mailbox,"INBOX")) { /* yes, if no empty proto try creating */ - if (!ts && !(*(ts = default_proto (NIL))->dtb->create) (ts,"INBOX")) - ts = NIL; + if (!ts){ + ts = default_proto (NIL); + if(!(*ts->dtb->create)(ts,"INBOX")) + ts = NIL; + } } else if (dummy_file (tmp,mailbox) && ((fd = open (tmp,O_RDONLY,NIL)) < 0)) { if ((e = errno) == ENOENT) /* failed, was it no such file? */ diff --git a/imap/src/osdep/unix/unix.c b/imap/src/osdep/unix/unix.c index 68f64269..97626576 100644 --- a/imap/src/osdep/unix/unix.c +++ b/imap/src/osdep/unix/unix.c @@ -588,12 +588,12 @@ void unix_close (MAILSTREAM *stream,long options) */ -STRINGLIST XIMAPbase = {"X-IMAPbase", 10, NIL}; -STRINGLIST XIMAP = {"X-IMAP", 6, &XIMAPbase}; -STRINGLIST XUID = {"X-UID", 5, &XIMAP}; -STRINGLIST XKeywords = {"X-Keywords", 10, &XUID}; -STRINGLIST XStatus = {"X-Status", 8, &XKeywords}; -STRINGLIST Status = {"Status", 6, &XStatus}; +STRINGLIST XIMAPbase = {{"X-IMAPbase", 10}, NIL}; +STRINGLIST XIMAP = {{"X-IMAP", 6}, &XIMAPbase}; +STRINGLIST XUID = {{"X-UID", 5}, &XIMAP}; +STRINGLIST XKeywords = {{"X-Keywords", 10}, &XUID}; +STRINGLIST XStatus = {{"X-Status", 8}, &XKeywords}; +STRINGLIST Status = {{"Status", 6}, &XStatus}; static STRINGLIST *unix_hlines = &Status; |