diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-02-28 13:53:28 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-02-28 14:11:19 +0100 |
commit | 944e10700c98f8ac71c2385fd96671167463fcf0 (patch) | |
tree | 92f215b977ee049b757b02cc8b398de644197222 | |
parent | e2baa1aa1cc0ec28d716228f150d29c632e57ade (diff) | |
download | fetchmail-944e10700c98f8ac71c2385fd96671167463fcf0.tar.gz fetchmail-944e10700c98f8ac71c2385fd96671167463fcf0.tar.bz2 fetchmail-944e10700c98f8ac71c2385fd96671167463fcf0.zip |
Remove unused assignments/initializations found with llvm-clang.
-rw-r--r-- | daemon.c | 4 | ||||
-rw-r--r-- | driver.c | 1 | ||||
-rw-r--r-- | env.c | 2 | ||||
-rw-r--r-- | gssapi.c | 5 | ||||
-rw-r--r-- | pop3.c | 8 | ||||
-rw-r--r-- | rfc2047e.c | 2 | ||||
-rw-r--r-- | sink.c | 2 | ||||
-rw-r--r-- | socket.c | 4 | ||||
-rw-r--r-- | transact.c | 6 | ||||
-rw-r--r-- | ucs/norm_charmap.c | 4 |
10 files changed, 18 insertions, 20 deletions
@@ -61,7 +61,7 @@ sigchld_handler (int sig) #if defined(HAVE_WAITPID) /* the POSIX way */ int status; - while ((pid = waitpid(-1, &status, WNOHANG)) > 0) + while (waitpid(-1, &status, WNOHANG) > 0) continue; /* swallow 'em up. */ #elif defined(HAVE_WAIT3) /* the BSD way */ #if defined(HAVE_UNION_WAIT) && !defined(__FreeBSD__) @@ -208,7 +208,7 @@ nottyDetach: (void)close(0); /* Reopen stdin descriptor on /dev/null */ - if ((fd = open("/dev/null", O_RDWR)) < 0) { /* stdin */ + if (open("/dev/null", O_RDWR) < 0) { /* stdin */ report(stderr, "cannot open /dev/null: %s\n", strerror(errno)); return(PS_IOERR); } @@ -1518,7 +1518,6 @@ is restored.")); smtp_close(ctl, 0); if (mailserver_socket != -1) { cleanupSockClose(mailserver_socket); - mailserver_socket = -1; } /* If there was a connect timeout, the socket should be closed. * mailserver_socket_temp contains the socket to close. @@ -318,7 +318,7 @@ char *visbuf(const char *buf) buf++; } } - *tp++ = '\0'; + *tp = '\0'; return(vbuf); } /* env.c ends here */ @@ -67,11 +67,10 @@ int do_gssauth(int sock, char *command, char *service, char *hostname, char *use return PS_AUTHFAIL; } else if (outlevel >= O_DEBUG) { - maj_stat = gss_display_name(&min_stat, target_name, &request_buf, - &mech_name); + gss_display_name(&min_stat, target_name, &request_buf, &mech_name); report(stderr, GT_("Using service name [%s]\n"), (char *)request_buf.value); - maj_stat = gss_release_buffer(&min_stat, &request_buf); + gss_release_buffer(&min_stat, &request_buf); } gen_send(sock, "%s GSSAPI", command); @@ -774,7 +774,7 @@ static int pop3_gettopid(int sock, int num , char *id, size_t idsize) if ((ok = gen_transact(sock, "%s", buf)) != 0) return ok; got_it = 0; - while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0) + while (gen_recv(sock, buf, sizeof(buf)) == 0) { if (DOTLINE(buf)) break; @@ -1065,10 +1065,10 @@ static int pop3_getrange(int sock, if (dofastuidl) return(pop3_fastuidl( sock, ctl, *countp, newp)); /* grab the mailbox's UID list */ - if ((ok = gen_transact(sock, "UIDL")) != 0) + if (gen_transact(sock, "UIDL") != 0) { /* don't worry, yet! do it the slow way */ - if ((ok = pop3_slowuidl(sock, ctl, countp, newp))) + if (pop3_slowuidl(sock, ctl, countp, newp)) { report(stderr, GT_("protocol error while fetching UIDLs\n")); return(PS_ERROR); @@ -1080,7 +1080,7 @@ static int pop3_getrange(int sock, unsigned long unum; *newp = 0; - while ((ok = gen_recv(sock, buf, sizeof(buf))) == PS_SUCCESS) + while (gen_recv(sock, buf, sizeof(buf)) == PS_SUCCESS) { if (DOTLINE(buf)) break; @@ -174,7 +174,7 @@ char *rfc2047e(const char *string, const char *charset) { if (i + 1 < count) m += strcspn(words[i+1], "\r\n"); if (l + m > 74) - l = 0, t = stpcpy(t, "\r\n"); + t = stpcpy(t, "\r\n"); t = stpcpy(t, words[i]); if (i + 1 < count) { t = stpcpy(t, words[i+1]); @@ -114,7 +114,7 @@ int smtp_setup(struct query *ctl) */ struct idlist *idp; const char *id_me = run.invisible ? ctl->server.truename : fetchmailhost; - int oldphase = phase; + int oldphase; char *parsed_host = NULL; errno = 0; @@ -462,7 +462,7 @@ int SockRead(int sock, char *buf, int len) /* SSL_peek says no data... Does he mean no data or did the connection blow up? If we got an error then bail! */ - if( 0 != ( n = SSL_get_error(ssl, n) ) ) { + if (0 != SSL_get_error(ssl, n)) { return -1; } /* We didn't get an error so read at least one @@ -542,7 +542,7 @@ int SockPeek(int sock) /* SSL_peek says 0... Does that mean no data or did the connection blow up? If we got an error then bail! */ - if( 0 != ( n = SSL_get_error(ssl, n) ) ) { + if(0 != SSL_get_error(ssl, n)) { return -1; } @@ -529,8 +529,8 @@ int readheaders(int sock, tcp = line + linelen - 1; *tcp++ = '\r'; *tcp++ = '\n'; - *tcp++ = '\0'; - n++; + *tcp = '\0'; + /* n++; - not used later on */ linelen++; } else @@ -1332,7 +1332,7 @@ process_headers: cp = buf; *cp++ = '\r'; *cp++ = '\n'; - *cp++ = '\0'; + *cp = '\0'; n = stuffline(ctl, buf); if ((size_t)n == strlen(buf)) diff --git a/ucs/norm_charmap.c b/ucs/norm_charmap.c index 2905e226..f00dcc26 100644 --- a/ucs/norm_charmap.c +++ b/ucs/norm_charmap.c @@ -84,7 +84,7 @@ const char *norm_charmap(const char *name) p += 5; if (digit(*p)) { buf[9] = *p++; - if (digit(*p)) buf[10] = *p++; + if (digit(*p)) buf[10] = *p; return buf; } } @@ -95,7 +95,7 @@ const char *norm_charmap(const char *name) p += 4; if (digit(*p)) { buf[10] = *p++; - if (digit(*p)) buf[11] = *p++; + if (digit(*p)) buf[11] = *p; return buf; } } |