From 5898e3006f8b327520fa02fc82afa3130cd10d9f Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 9 Nov 2001 12:57:09 +0000 Subject: [PATCH] 2001-11-09 Robert Collins * simpsock.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). (SimpleSocket::SimpleSocket): Avoid compiler warnings (deprecated conversion). (SimpleSocket::printf): Ditto. (SimpleSocket::write): Ditto. * simpsock.h (SimpleSocket): Avoid compiler warnings for constructor, printf and write. * nio-ftp.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). (NetIO_FTP::NetIO_FTP): Remove unused variable done. * nio-http.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). --- ChangeLog | 12 ++++++++++++ nio-ftp.cc | 5 +++-- nio-http.cc | 4 +++- simpsock.cc | 10 ++++++---- simpsock.h | 6 +++--- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0969aca..2b9682ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-11-09 Robert Collins + + * simpsock.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). + (SimpleSocket::SimpleSocket): Avoid compiler warnings (deprecated conversion). + (SimpleSocket::printf): Ditto. + (SimpleSocket::write): Ditto. + * simpsock.h (SimpleSocket): Avoid compiler warnings for constructor, + printf and write. + * nio-ftp.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). + (NetIO_FTP::NetIO_FTP): Remove unused variable done. + * nio-http.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). + 2001-11-07 Charles Wilson * geturl.cc (get_url_to_string): clean up memory leak diff --git a/nio-ftp.cc b/nio-ftp.cc index 970f6a7f..fe69835f 100644 --- a/nio-ftp.cc +++ b/nio-ftp.cc @@ -16,7 +16,9 @@ /* This file is responsible for implementing all direct FTP protocol channels. It is intentionally simplistic. */ -static char *cvsid = "\n%%% $Id$\n"; +#if 0 +static const char *cvsid = "\n%%% $Id$\n"; +#endif #include "win32.h" #include "winsock.h" @@ -70,7 +72,6 @@ NetIO_FTP::NetIO_FTP (char *Purl, BOOL allow_ftp_auth) if (cmd == 0) { SimpleSocket *c = new SimpleSocket (host, port); - int done = 0; code = ftp_line (c); auth_retry: diff --git a/nio-http.cc b/nio-http.cc index a0333fe9..962dcfda 100644 --- a/nio-http.cc +++ b/nio-http.cc @@ -16,7 +16,9 @@ /* This file is responsible for implementing all direct HTTP protocol channels. It is intentionally simplistic. */ -static char *cvsid = "\n%%% $Id$\n"; +#if 0 +static const char *cvsid = "\n%%% $Id$\n"; +#endif #include "win32.h" #include "winsock.h" diff --git a/simpsock.cc b/simpsock.cc index 9ae9f5a8..3aba9e58 100644 --- a/simpsock.cc +++ b/simpsock.cc @@ -15,7 +15,9 @@ /* Simplified socket access functions */ -static char *cvsid = "\n%%% $Id$\n"; +#if 0 +static const char *cvsid = "\n%%% $Id$\n"; +#endif #include "win32.h" #include @@ -28,7 +30,7 @@ static char *cvsid = "\n%%% $Id$\n"; #define SSBUFSZ 1024 -SimpleSocket::SimpleSocket (char *hostname, int port) +SimpleSocket::SimpleSocket (const char *hostname, int port) { static int initted = 0; if (!initted) @@ -108,7 +110,7 @@ SimpleSocket::ok () } int -SimpleSocket::printf (char *fmt, ...) +SimpleSocket::printf (const char *fmt, ...) { char buf[SSBUFSZ]; va_list args; @@ -118,7 +120,7 @@ SimpleSocket::printf (char *fmt, ...) } int -SimpleSocket::write (char *buf, int len) +SimpleSocket::write (const char *buf, int len) { return send (s, buf, len, 0); } diff --git a/simpsock.h b/simpsock.h index cde49dd9..7fbf4a21 100644 --- a/simpsock.h +++ b/simpsock.h @@ -23,13 +23,13 @@ class SimpleSocket { int fill (); public: - SimpleSocket (char *hostname, int port); + SimpleSocket (const char *hostname, int port); ~SimpleSocket (); int ok (); - int printf (char *fmt, ...); - int write (char *buf, int len); + int printf (const char *fmt, ...); + int write (const char *buf, int len); char *gets (); int read (char *buf, int len); -- 2.43.5