diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2009-01-14 01:56:15 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2009-01-14 01:56:15 +0000 |
commit | af7d73c7ab76ad81fed78b7f5c024daf1af87d9d (patch) | |
tree | 9edb72176a3491b5d10e48b9570aca071fdba731 | |
parent | a804c2b676aa9629bea657e78d5e6803b85228cc (diff) | |
download | fetchmail-af7d73c7ab76ad81fed78b7f5c024daf1af87d9d.tar.gz fetchmail-af7d73c7ab76ad81fed78b7f5c024daf1af87d9d.tar.bz2 fetchmail-af7d73c7ab76ad81fed78b7f5c024daf1af87d9d.zip |
Fix a few compiler warnings around implicit conversion or extra ";".
svn path=/branches/BRANCH_6-3/; revision=5261
-rw-r--r-- | env.c | 2 | ||||
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | imap.c | 4 | ||||
-rw-r--r-- | interface.c | 4 | ||||
-rw-r--r-- | pop3.c | 2 | ||||
-rw-r--r-- | rcfile_l.l | 2 | ||||
-rw-r--r-- | rcfile_y.y | 2 | ||||
-rw-r--r-- | report.c | 8 | ||||
-rw-r--r-- | rfc2047e.c | 8 | ||||
-rw-r--r-- | rfc822.c | 2 | ||||
-rw-r--r-- | sink.c | 2 | ||||
-rw-r--r-- | socket.c | 4 | ||||
-rw-r--r-- | transact.c | 6 | ||||
-rw-r--r-- | uid.c | 2 | ||||
-rw-r--r-- | unmime.c | 4 |
15 files changed, 27 insertions, 27 deletions
@@ -292,7 +292,7 @@ char *visbuf(const char *buf) if (needed > vbufs) { vbufs = needed; - vbuf = xrealloc(vbuf, vbufs); + vbuf = (char *)xrealloc(vbuf, vbufs); } tp = vbuf; diff --git a/fetchmail.c b/fetchmail.c index bf88b4dd..e7f48668 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -532,7 +532,7 @@ int main(int argc, char **argv) const char* password_prompt = GT_("Enter password for %s@%s: "); size_t pplen = strlen(password_prompt) + strlen(ctl->remotename) + strlen(ctl->server.pollname) + 1; - tmpbuf = xmalloc(pplen); + tmpbuf = (char *)xmalloc(pplen); snprintf(tmpbuf, pplen, password_prompt, ctl->remotename, ctl->server.pollname); ctl->password = xstrdup((char *)fm_getpassword(tmpbuf)); @@ -617,8 +617,8 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) size_t rnl, pwl; rnl = 2 * strlen(ctl->remotename) + 1; pwl = 2 * strlen(ctl->password) + 1; - remotename = xmalloc(rnl); - password = xmalloc(pwl); + remotename = (char *)xmalloc(rnl); + password = (char *)xmalloc(pwl); imap_canonicalize(remotename, ctl->remotename, rnl); imap_canonicalize(password, ctl->password, pwl); diff --git a/interface.c b/interface.c index 70e99ba9..0b0d5791 100644 --- a/interface.c +++ b/interface.c @@ -418,7 +418,7 @@ get_ifinfo(const char *ifname, ifinfo_t *ifinfo) GT_("get_ifinfo: sysctl (iflist estimate) failed")); exit(1); } - if ((buf = malloc(needed)) == NULL) + if ((buf = (char *)malloc(needed)) == NULL) { report(stderr, GT_("get_ifinfo: malloc failed")); @@ -736,5 +736,5 @@ int interface_approve(struct hostdata *hp, flag domonitor) #endif /* CAN_MONITOR */ #ifndef have_interface_init -void interface_init(void) {}; +void interface_init(void) {} #endif @@ -687,7 +687,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) } /* copy timestamp and password into digestion buffer */ - msg = xmalloc((end-start+1) + strlen(ctl->password) + 1); + msg = (char *)xmalloc((end-start+1) + strlen(ctl->password) + 1); strcpy(msg,start); strcat(msg,ctl->password); strcpy(ctl->digest, MD5Digest((unsigned char *)msg)); @@ -55,7 +55,7 @@ int prc_lineno = 1; if ((size_t)yyleng + 1 > ins) { ins = yyleng + 1; - in = xrealloc(in, ins); + in = (char *)xrealloc(in, ins); } memcpy(in, yytext, yyleng); in[yyleng] = '\0'; @@ -573,7 +573,7 @@ char *prependdir (const char *file, const char *dir) strcmp(file, "-") == 0 || /* stdin/stdout */ !dir[0]) /* we don't HAVE_GETCWD */ return xstrdup (file); - newfile = xmalloc (strlen (dir) + 1 + strlen (file) + 1); + newfile = (char *)xmalloc (strlen (dir) + 1 + strlen (file) + 1); if (dir[strlen(dir) - 1] != '/') sprintf (newfile, "%s/%s", dir, file); else @@ -211,13 +211,13 @@ static void rep_ensuresize(void) { { partial_message_size_used = 0; partial_message_size = 2048; - partial_message = MALLOC (partial_message_size); + partial_message = (char *)MALLOC (partial_message_size); } else if (partial_message_size - partial_message_size_used < 1024) { partial_message_size += 2048; - partial_message = REALLOC (partial_message, partial_message_size); + partial_message = (char *)REALLOC (partial_message, partial_message_size); } } @@ -258,7 +258,7 @@ report_build (FILE *errfp, message, va_alist) } partial_message_size += 2048; - partial_message = REALLOC (partial_message, partial_message_size); + partial_message = (char *)REALLOC (partial_message, partial_message_size); } #else for ( ; ; ) @@ -326,7 +326,7 @@ report_complete (FILE *errfp, message, va_alist) } partial_message_size += 2048; - partial_message = REALLOC (partial_message, partial_message_size); + partial_message = (char *)REALLOC (partial_message, partial_message_size); } #else for ( ; ; ) @@ -52,7 +52,7 @@ static char *encode_words(char *const *words, int nwords, const char *charset) l += strlen(words[i]) * 3; /* worst case, encode everything */ l += (strlen(charset) + 8) * (l/60 + 1); - out = v = xmalloc(l); + out = v = (char *)xmalloc(l); t = stpcpy(out, "=?"); t = stpcpy(t, charset); t = stpcpy(t, "?Q?"); @@ -110,14 +110,14 @@ char *rfc2047e(const char *string, const char *charset) { r = string; while (*r) { l = strcspn(r, ws); - words[idx] = xmalloc(l+1); + words[idx] = (char *)xmalloc(l+1); memcpy(words[idx], r, l); words[idx][l] = '\0'; idx++; r += l; if (!*r) break; l = strspn(r, ws); - words[idx] = xmalloc(l+1); + words[idx] = (char *)xmalloc(l+1); memcpy(words[idx], r, l); words[idx][l] = '\0'; idx++; @@ -157,7 +157,7 @@ char *rfc2047e(const char *string, const char *charset) { /* phase 3: limit lengths */ minlen = strlen(charset) + 7; /* allocate ample memory */ - out = xmalloc(l + (l / (72 - minlen) + 1) * (minlen + 2) + 1); + out = (char *)xmalloc(l + (l / (72 - minlen) + 1) * (minlen + 2) + 1); if (count) t = stpcpy(out, words[0]); @@ -79,7 +79,7 @@ char *reply_hack( for (cp = buf; *cp; cp++) if (*cp == ',' || isspace((unsigned char)*cp)) addresscount++; - buf = xrealloc(buf, strlen(buf) + addresscount * (strlen(host) + 1) + 1); + buf = (char *)xrealloc(buf, strlen(buf) + addresscount * (strlen(host) + 1) + 1); #endif /* MAIN */ /* @@ -1155,7 +1155,7 @@ static int open_mda_sink(struct query *ctl, struct msgblk *msg, sp += 2; } - after = xmalloc(length + 1); + after = (char *)xmalloc(length + 1); /* copy mda source string to after, while expanding %[sTF] */ for (dp = after, sp = before; (*dp = *sp); dp++, sp++) { @@ -468,7 +468,7 @@ int SockRead(int sock, char *buf, int len) * We don't have a string to pass through * the strchr at this point yet */ newline = NULL; - } else if ((newline = memchr(bp, '\n', n)) != NULL) + } else if ((newline = (char *)memchr(bp, '\n', n)) != NULL) n = newline - bp + 1; /* Matthias Andree: SSL_read can return 0, in that case * we must call SSL_get_error to figure if there was @@ -638,7 +638,7 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) /* RFC 2595 section 2.4: find a matching name * first find a match among alternative names */ - gens = X509_get_ext_d2i(x509_cert, NID_subject_alt_name, NULL, NULL); + gens = (STACK_OF(GENERAL_NAME) *)X509_get_ext_d2i(x509_cert, NID_subject_alt_name, NULL, NULL); if (gens) { int i, r; for (i = 0, r = sk_GENERAL_NAME_num(gens); i < r; ++i) { @@ -446,7 +446,7 @@ int readheaders(int sock, { char *line, *rline; - line = xmalloc(sizeof(buf)); + line = (char *)xmalloc(sizeof(buf)); linelen = 0; line[0] = '\0'; do { @@ -807,7 +807,7 @@ int readheaders(int sock, if (!msgblk.headers) { oldlen = linelen; - msgblk.headers = xmalloc(oldlen + 1); + msgblk.headers = (char *)xmalloc(oldlen + 1); (void) memcpy(msgblk.headers, line, linelen); msgblk.headers[oldlen] = '\0'; free(line); @@ -1300,7 +1300,7 @@ int readheaders(int sock, if (idp->val.status.mark == XMIT_RCPTBAD) errlen += strlen(idp->id) + 2; - errmsg = xmalloc(errlen + 3); + errmsg = (char *)xmalloc(errlen + 3); strcpy(errmsg, errhd); for (idp = msgblk.recipients; idp; idp = idp->next) if (idp->val.status.mark == XMIT_RCPTBAD) @@ -619,7 +619,7 @@ void write_saved_lists(struct query *hostlist, const char *idfile) if (unlink(idfile) && errno != ENOENT) report(stderr, GT_("Error deleting %s: %s\n"), idfile, strerror(errno)); } else { - char *newnam = xmalloc(strlen(idfile) + 2); + char *newnam = (char *)xmalloc(strlen(idfile) + 2); strcpy(newnam, idfile); strcat(newnam, "_"); if (outlevel >= O_DEBUG) @@ -434,7 +434,7 @@ int MimeBodyType(char *hdrs, int WantDecode) if (p == NULL) p = NxtHdr + strlen(NxtHdr); xfree(CntType); - CntType = xmalloc(p-NxtHdr+1); + CntType = (char *)xmalloc(p-NxtHdr+1); strlcpy(CntType, NxtHdr, p-NxtHdr+1); HdrsFound++; } @@ -707,7 +707,7 @@ int main(int argc, char *argv[]) buf_p++; if ((unsigned)(buf_p - buffer) == BufSize) { /* Buffer is full! Get more room. */ - buffer = xrealloc(buffer, BufSize+BUFSIZE_INCREMENT); + buffer = (char *)xrealloc(buffer, BufSize+BUFSIZE_INCREMENT); buf_p = buffer + BufSize; BufSize += BUFSIZE_INCREMENT; } |