libfetch: fix warnings.

This commit is contained in:
Juan RP 2012-07-19 18:00:31 +02:00
parent 9a69c5e349
commit 3339d0cd25
2 changed files with 3 additions and 8 deletions

View File

@ -320,7 +320,7 @@ ftp_cwd(conn_t *conn, const char *path, int subdir)
} else if (strcmp(conn->ftp_home, "/") == 0) { } else if (strcmp(conn->ftp_home, "/") == 0) {
dst = strdup(path - 1); dst = strdup(path - 1);
} else { } else {
asprintf(&dst, "%s/%s", conn->ftp_home, path); e = asprintf(&dst, "%s/%s", conn->ftp_home, path);
} }
if (dst == NULL) { if (dst == NULL) {
fetch_syserr(); fetch_syserr();
@ -614,7 +614,6 @@ static void
ftp_closefn(void *v) ftp_closefn(void *v)
{ {
struct ftpio *io; struct ftpio *io;
int r;
io = (struct ftpio *)v; io = (struct ftpio *)v;
if (io == NULL) { if (io == NULL) {
@ -630,7 +629,7 @@ ftp_closefn(void *v)
fetch_close(io->dconn); fetch_close(io->dconn);
io->dconn = NULL; io->dconn = NULL;
io->dir = -1; io->dir = -1;
r = ftp_chkerr(io->cconn); ftp_chkerr(io->cconn);
fetch_cache_put(io->cconn, ftp_disconnect); fetch_cache_put(io->cconn, ftp_disconnect);
free(io); free(io);
return; return;
@ -672,14 +671,13 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file, const char *op_ar
const char *bindaddr; const char *bindaddr;
const char *filename; const char *filename;
int filenamelen, type; int filenamelen, type;
int low, pasv, verbose; int pasv, verbose;
int e, sd = -1; int e, sd = -1;
socklen_t l; socklen_t l;
char *s; char *s;
fetchIO *df; fetchIO *df;
/* check flags */ /* check flags */
low = CHECK_FLAG('l');
pasv = !CHECK_FLAG('a'); pasv = !CHECK_FLAG('a');
verbose = CHECK_FLAG('v'); verbose = CHECK_FLAG('v');

View File

@ -63,9 +63,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* Needed for gmtime_r on Interix */
#define _REENTRANT
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif