]> granicus.if.org Git - php/commitdiff
Remove compile warnings:
authorChristopher Jones <sixd@php.net>
Tue, 20 Aug 2013 00:48:46 +0000 (17:48 -0700)
committerChristopher Jones <sixd@php.net>
Tue, 20 Aug 2013 00:48:46 +0000 (17:48 -0700)
  warning: variable ‘lastch’ set but not used [-Wunused-but-set-variable]
  warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]

ext/ftp/ftp.c

index 0d6704f9d21a05c56567e29f6e479aedbba82e7d..2c5bc5d7e39e0424a4649fb553a965707ef549f6 100644 (file)
@@ -790,7 +790,6 @@ int
 ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, long resumepos TSRMLS_DC)
 {
        databuf_t               *data = NULL;
-       int                     lastch;
        size_t                  rcvd;
        char                    arg[11];
 
@@ -828,7 +827,6 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
                goto bail;
        }
 
-       lastch = 0;
        while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
                if (rcvd == -1) {
                        goto bail;
@@ -1187,12 +1185,9 @@ ftp_readline(ftpbuf_t *ftp)
 int
 ftp_getresp(ftpbuf_t *ftp)
 {
-       char *buf;
-
        if (ftp == NULL) {
                return 0;
        }
-       buf = ftp->inbuf;
        ftp->resp = 0;
 
        while (1) {