com php-src: Remove compile warnings: warning: variable ‘lastch’ set but not used [-Wunused -but-set-variable] warning: variable ‘b uf’
set but not used [-Wunused-but-set-vari able]: ext/ftp/ftp.c
| From: | Christopher Jones | Date: | Tue, 20 Aug 2013 00:48:46 +0000 |
| Subject: | com php-src: Remove compile warnings: warning: variable ‘lastch’ set but not used [-Wunused -but-set-variable] warning: variable ‘b uf’ set but not used [-Wunused-but-set-vari able]: ext/ftp/ftp.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73007@lists.php.net to get a copy of this message | ||
Commit: 83469477e70cba8191a4698252fc83804e88322b
Author: Christopher Jones <sixd@php.net> Mon, 19 Aug 2013 17:48:46 -0700
Parents: f69a5c520fd699a32d0787dc04984313b2b677ff
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=83469477e70cba8191a4698252fc83804e88322b
Log:
Remove compile warnings:
warning: variable ‘lastch’ set but not used [-Wunused-but-set-variable]
warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
Changed paths:
M ext/ftp/ftp.c
Diff:
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 0d6704f..2c5bc5d 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -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) {