From 387f8230cfee60fe195bcb854123eb6b24b422b1 Mon Sep 17 00:00:00 2001 From: Vadim Glazunov Date: Tue, 9 Sep 2008 21:10:24 +0000 Subject: [PATCH] gcc fixes --- CCallback.h | 2 +- CConsoleHandler.h | 2 +- CMT.cpp | 2 +- lib/Connection.cpp | 3 ++- server/CVCMIServer.cpp | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CCallback.h b/CCallback.h index 1fc28acf7..285a38fdb 100644 --- a/CCallback.h +++ b/CCallback.h @@ -168,7 +168,7 @@ public: #ifndef __GNUC__ friend int _tmain(int argc, _TCHAR* argv[]); #else - friend int main(int argc, _TCHAR* argv[]); + friend int main(int argc, char** argv); #endif }; #endif //CCALLBACK_H diff --git a/CConsoleHandler.h b/CConsoleHandler.h index e84579b8c..52717df50 100644 --- a/CConsoleHandler.h +++ b/CConsoleHandler.h @@ -12,7 +12,7 @@ public: #ifndef __GNUC__ friend int _tmain(int argc, _TCHAR* argv[]); #else - friend int main(int argc, _TCHAR* argv[]); + friend int main(int argc, char **argv); #endif }; diff --git a/CMT.cpp b/CMT.cpp index d70f51f9a..eb6eed330 100644 --- a/CMT.cpp +++ b/CMT.cpp @@ -48,7 +48,7 @@ TTF_Font * TNRB16, *TNR, *GEOR13, *GEORXX, *GEORM, *GEOR16; #ifndef __GNUC__ int _tmain(int argc, _TCHAR* argv[]) #else -int main(int argc, _TCHAR* argv[]) +int main(int argc, char** argv) #endif { int port; diff --git a/lib/Connection.cpp b/lib/Connection.cpp index ad9cf7b8e..12a5fe36a 100644 --- a/lib/Connection.cpp +++ b/lib/Connection.cpp @@ -39,6 +39,7 @@ void CConnection::init() CConnection::CConnection(std::string host, std::string port, std::string Name, std::ostream & Out) :io_service(new asio::io_service), name(Name), out(Out)//, send(this), rec(this) { + int i; boost::system::error_code error = asio::error::host_not_found; socket = new tcp::socket(*io_service); tcp::resolver resolver(*io_service); @@ -56,7 +57,7 @@ CConnection::CConnection(std::string host, std::string port, std::string Name, s std::cout<< "Critical problem: No endpoints found!" << std::endl; goto connerror1; } - int i=0; + i=0; while(pom != end) { std::cout << "\t" << i << ": " << (boost::asio::ip::tcp::endpoint&)*pom << std::endl; diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp index 0326ffcce..ade068df9 100644 --- a/server/CVCMIServer.cpp +++ b/server/CVCMIServer.cpp @@ -126,7 +126,7 @@ void CVCMIServer::start() #ifndef __GNUC__ int _tmain(int argc, _TCHAR* argv[]) #else -int main(int argc, _TCHAR* argv[]) +int main(int argc, char** argv) #endif { if(argc > 1)