alpine/operation-may-be-undefined-warning.diff

31 lines
755 B
Diff

--- alpine/folder.c
+++ alpine/folder.c
@@ -6013,7 +6013,7 @@
continue;
case 14 : /* toggle comparison */
- *cmp = ++(*cmp) % 3;
+ *cmp = ((*cmp) + 1) % 3;
continue;
case -1 : /* cancel */
--- imap/src/c-client/mail.c
+++ imap/src/c-client/mail.c
@@ -2931,8 +2931,14 @@
/* parse time */
d = strtoul (s+1,(char **) &s,10);
if (*s != ':') return NIL;
- m = strtoul (++s,(char **) &s,10);
- y = (*s == ':') ? strtoul (++s,(char **) &s,10) : 0;
+ s++;
+ m = strtoul (s,(char **) &s,10);
+ if (*s == ':') {
+ s++;
+ y = strtoul(s, (char **)&s, 10);
+ } else {
+ y = 0;
+ }
/* validity check time */
if ((d > 23) || (m > 59) || (y > 60)) return NIL;
/* set values in elt */