diff options
Diffstat (limited to 'cpp')
36 files changed, 189 insertions, 92 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index eb2d286c3c5..d4b1040c8b3 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -9,7 +9,7 @@ # # ********************************************************************** -import sys, os, string +import sys, os serverPids = [] diff --git a/cpp/config/makedepend.py b/cpp/config/makedepend.py index ebd5a1ad339..b1a07371157 100755 --- a/cpp/config/makedepend.py +++ b/cpp/config/makedepend.py @@ -9,12 +9,12 @@ # # ********************************************************************** -import fileinput, string +import fileinput previous = "" for line in fileinput.input(): - line = string.strip(line) + line = line.strip() if(previous): line = previous + " " + line @@ -25,7 +25,7 @@ for line in fileinput.input(): else: previous = "" - for s in string.split(line): + for s in line.split(): if(s[0] != "/"): print s, diff --git a/cpp/src/Ice/SslAcceptor.cpp b/cpp/src/Ice/SslAcceptor.cpp index 56717319e9d..d23f2fe08fa 100644 --- a/cpp/src/Ice/SslAcceptor.cpp +++ b/cpp/src/Ice/SslAcceptor.cpp @@ -109,7 +109,9 @@ IceInternal::SslAcceptor::equivalent(const string& host, int port) const struct sockaddr_in addr; getAddress(host.c_str(), port, addr); if (addr.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) + { return port == ntohs(_addr.sin_port); + } struct sockaddr_in localAddr; getLocalAddress(ntohs(_addr.sin_port), localAddr); @@ -126,7 +128,9 @@ IceInternal::SslAcceptor::SslAcceptor(const InstancePtr& instance, int port) : #endif if (_backlog <= 0) + { _backlog = 5; + } try { diff --git a/cpp/src/Ice/SslTransceiver.cpp b/cpp/src/Ice/SslTransceiver.cpp index eeb334ae0c5..ba11c44533c 100644 --- a/cpp/src/Ice/SslTransceiver.cpp +++ b/cpp/src/Ice/SslTransceiver.cpp @@ -70,7 +70,9 @@ IceInternal::SslTransceiver::write(Buffer& buf, int timeout) // Limit packet size to avoid performance problems on WIN32 // if (packetSize > 64 * 1024) + { packetSize = 64 * 1024; + } #endif while (buf.i != buf.b.end()) @@ -90,7 +92,9 @@ IceInternal::SslTransceiver::write(Buffer& buf, int timeout) if (ret == SOCKET_ERROR) { if (interrupted()) + { continue; + } if (noBuffers() && packetSize > 1024) { @@ -114,27 +118,37 @@ IceInternal::SslTransceiver::write(Buffer& buf, int timeout) ret = ::select(fd + 1, 0, &wFdSet, 0, &tv); } else + { ret = ::select(fd + 1, 0, &wFdSet, 0, 0); + } if (ret == SOCKET_ERROR) { if (interrupted()) + { goto repeatSelect; + } throw SocketException(__FILE__, __LINE__); } if (ret == 0) + { throw TimeoutException(__FILE__, __LINE__); + } } continue; } if (connectionLost()) + { throw ConnectionLostException(__FILE__, __LINE__); + } else + { throw SocketException(__FILE__, __LINE__); + } } #ifndef ICE_NO_TRACE @@ -149,7 +163,9 @@ IceInternal::SslTransceiver::write(Buffer& buf, int timeout) buf.i += ret; if (packetSize > buf.b.end() - buf.i) + { packetSize = buf.b.end() - buf.i; + } } } @@ -175,7 +191,9 @@ IceInternal::SslTransceiver::read(Buffer& buf, int timeout) if (ret == SOCKET_ERROR) { if (interrupted()) + { continue; + } if (noBuffers() && packetSize > 1024) { @@ -199,27 +217,37 @@ IceInternal::SslTransceiver::read(Buffer& buf, int timeout) ret = ::select(fd + 1, &rFdSet, 0, 0, &tv); } else + { ret = ::select(fd + 1, &rFdSet, 0, 0, 0); + } if (ret == SOCKET_ERROR) { if (interrupted()) + { goto repeatSelect; + } throw SocketException(__FILE__, __LINE__); } if (ret == 0) + { throw TimeoutException(__FILE__, __LINE__); + } } continue; } if (connectionLost()) + { throw ConnectionLostException(__FILE__, __LINE__); + } else + { throw SocketException(__FILE__, __LINE__); + } } #ifndef ICE_NO_TRACE @@ -234,7 +262,9 @@ IceInternal::SslTransceiver::read(Buffer& buf, int timeout) buf.i += ret; if (packetSize > buf.b.end() - buf.i) + { packetSize = buf.b.end() - buf.i; + } } } diff --git a/cpp/src/Ice/TcpAcceptor.cpp b/cpp/src/Ice/TcpAcceptor.cpp index 779551b2aee..28c43b9ef16 100644 --- a/cpp/src/Ice/TcpAcceptor.cpp +++ b/cpp/src/Ice/TcpAcceptor.cpp @@ -109,7 +109,9 @@ IceInternal::TcpAcceptor::equivalent(const string& host, int port) const struct sockaddr_in addr; getAddress(host.c_str(), port, addr); if (addr.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) + { return port == ntohs(_addr.sin_port); + } struct sockaddr_in localAddr; getLocalAddress(ntohs(_addr.sin_port), localAddr); @@ -126,7 +128,9 @@ IceInternal::TcpAcceptor::TcpAcceptor(const InstancePtr& instance, int port) : #endif if (_backlog <= 0) + { _backlog = 5; + } try { diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp index 55240ec8eb1..9785922af1f 100644 --- a/cpp/src/Ice/TcpTransceiver.cpp +++ b/cpp/src/Ice/TcpTransceiver.cpp @@ -70,7 +70,9 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout) // Limit packet size to avoid performance problems on WIN32 // if (packetSize > 64 * 1024) + { packetSize = 64 * 1024; + } #endif while (buf.i != buf.b.end()) @@ -90,7 +92,9 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout) if (ret == SOCKET_ERROR) { if (interrupted()) + { continue; + } if (noBuffers() && packetSize > 1024) { @@ -114,27 +118,37 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout) ret = ::select(fd + 1, 0, &wFdSet, 0, &tv); } else + { ret = ::select(fd + 1, 0, &wFdSet, 0, 0); + } if (ret == SOCKET_ERROR) { if (interrupted()) + { goto repeatSelect; + } throw SocketException(__FILE__, __LINE__); } if (ret == 0) + { throw TimeoutException(__FILE__, __LINE__); + } } continue; } if (connectionLost()) + { throw ConnectionLostException(__FILE__, __LINE__); + } else + { throw SocketException(__FILE__, __LINE__); + } } #ifndef ICE_NO_TRACE @@ -149,7 +163,9 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout) buf.i += ret; if (packetSize > buf.b.end() - buf.i) + { packetSize = buf.b.end() - buf.i; + } } } @@ -175,7 +191,9 @@ IceInternal::TcpTransceiver::read(Buffer& buf, int timeout) if (ret == SOCKET_ERROR) { if (interrupted()) + { continue; + } if (noBuffers() && packetSize > 1024) { @@ -199,27 +217,37 @@ IceInternal::TcpTransceiver::read(Buffer& buf, int timeout) ret = ::select(fd + 1, &rFdSet, 0, 0, &tv); } else + { ret = ::select(fd + 1, &rFdSet, 0, 0, 0); + } if (ret == SOCKET_ERROR) { if (interrupted()) + { goto repeatSelect; + } throw SocketException(__FILE__, __LINE__); } if (ret == 0) + { throw TimeoutException(__FILE__, __LINE__); + } } continue; } if (connectionLost()) + { throw ConnectionLostException(__FILE__, __LINE__); + } else + { throw SocketException(__FILE__, __LINE__); + } } #ifndef ICE_NO_TRACE @@ -234,7 +262,9 @@ IceInternal::TcpTransceiver::read(Buffer& buf, int timeout) buf.i += ret; if (packetSize > buf.b.end() - buf.i) + { packetSize = buf.b.end() - buf.i; + } } } diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index 5ec525de5f3..a22a0ee065e 100644 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -35,9 +35,13 @@ IceInternal::UdpTransceiver::close() { ostringstream s; if (_sender) + { s << "stopping to send packets to " << toString(); + } else + { s << "stopping to receive packets at " << toString(); + } _logger->trace(_traceLevels->networkCat, s.str()); } #endif @@ -66,7 +70,9 @@ repeat: if (ret == SOCKET_ERROR) { if (interrupted()) + { goto repeat; + } throw SocketException(__FILE__, __LINE__); } @@ -100,7 +106,9 @@ repeat: if (ret == SOCKET_ERROR) { if (interrupted()) + { goto repeat; + } throw SocketException(__FILE__, __LINE__); } @@ -128,12 +136,16 @@ bool IceInternal::UdpTransceiver::equivalent(const string& host, int port) const { if (_sender) + { return false; + } struct sockaddr_in addr; getAddress(host.c_str(), port, addr); if (addr.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) + { return port == ntohs(_addr.sin_port); + } struct sockaddr_in localAddr; getLocalAddress(ntohs(_addr.sin_port), localAddr); diff --git a/cpp/src/IcePack/Activator.cpp b/cpp/src/IcePack/Activator.cpp index ecc3a84da62..a75bc1b4874 100644 --- a/cpp/src/IcePack/Activator.cpp +++ b/cpp/src/IcePack/Activator.cpp @@ -13,6 +13,7 @@ #include <IcePack/Admin.h> #include <sstream> #include <fcntl.h> +#include <sys/wait.h> using namespace std; using namespace Ice; @@ -296,6 +297,17 @@ IcePack::Activator::terminationListener() } } } + + // + // Remove zombie processes, if any + // + if (waitpid(-1, 0, WNOHANG | WUNTRACED) == -1) + { + if (errno != ECHILD) // Ignore ECHILD + { + throw SystemException(__FILE__, __LINE__); + } + } } } diff --git a/cpp/src/IcePack/Forward.cpp b/cpp/src/IcePack/Forward.cpp index 390cdc7945c..cfdf25e3bde 100644 --- a/cpp/src/IcePack/Forward.cpp +++ b/cpp/src/IcePack/Forward.cpp @@ -31,7 +31,7 @@ IcePack::Forward::Forward(const CommunicatorPtr& communicator, const AdminPtr& a value = properties->getProperty("IcePack.Activator.WaitTime"); if (value.length()) { - _waitTime = atoi(value); + _waitTime = atoi(value.c_str()); if (_waitTime < 0) { _waitTime = 0; diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp index 1f3febedad8..da7cb9be577 100644 --- a/cpp/src/IcePack/Parser.cpp +++ b/cpp/src/IcePack/Parser.cpp @@ -216,9 +216,12 @@ IcePack::Parser::error(const char* s) { if (!yycommands && !isatty(fileno(yyin))) { - cerr << _currentFile << ':' << _currentLine << ' '; + cerr << _currentFile << ':' << _currentLine << ": " << s << endl; + } + else + { + cerr << "error: " << s << endl; } - cerr << "error: " << s << endl; yynerrs++; } @@ -233,9 +236,12 @@ IcePack::Parser::warning(const char* s) { if (!yycommands && !isatty(fileno(yyin))) { - cerr << _currentFile << ':' << _currentLine << ' '; + cerr << _currentFile << ':' << _currentLine << ": warning: " << s << endl; + } + else + { + cerr << "warning: " << s << endl; } - cerr << "warning: " << s << endl; } void diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 63a7da6e124..58da790bea5 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -1664,7 +1664,7 @@ Slice::Unit::currentIncludeLevel() void Slice::Unit::error(const char* s) { - cerr << _currentFile << ':' << _currentLine << " error: " << s << endl; + cerr << _currentFile << ':' << _currentLine << ": " << s << endl; yynerrs++; } @@ -1677,7 +1677,7 @@ Slice::Unit::error(const string& s) void Slice::Unit::warning(const char* s) { - cerr << _currentFile << ':' << _currentLine << " warning: " << s << endl; + cerr << _currentFile << ':' << _currentLine << ": warning: " << s << endl; } void diff --git a/cpp/test/Slice/errorDetection/ClassRedefinition.err b/cpp/test/Slice/errorDetection/ClassRedefinition.err index 870a9ac4ea1..f59d9e7a53b 100644 --- a/cpp/test/Slice/errorDetection/ClassRedefinition.err +++ b/cpp/test/Slice/errorDetection/ClassRedefinition.err @@ -1,2 +1,2 @@ -ClassRedefinition.ice:12 error: redefinition of class `Class1' -ClassRedefinition.ice:16 error: redefinition of class `Class2' +ClassRedefinition.ice:12: redefinition of class `Class1' +ClassRedefinition.ice:16: redefinition of class `Class2' diff --git a/cpp/test/Slice/errorDetection/DataMemberRedefinition.err b/cpp/test/Slice/errorDetection/DataMemberRedefinition.err index d838fc64725..cf064bf5a10 100644 --- a/cpp/test/Slice/errorDetection/DataMemberRedefinition.err +++ b/cpp/test/Slice/errorDetection/DataMemberRedefinition.err @@ -1 +1 @@ -DataMemberRedefinition.ice:14 error: redefinition of data member `member' +DataMemberRedefinition.ice:14: redefinition of data member `member' diff --git a/cpp/test/Slice/errorDetection/DeclaratorMissing.err b/cpp/test/Slice/errorDetection/DeclaratorMissing.err index 32e95edefba..ff96a12797a 100644 --- a/cpp/test/Slice/errorDetection/DeclaratorMissing.err +++ b/cpp/test/Slice/errorDetection/DeclaratorMissing.err @@ -1,4 +1,4 @@ -DeclaratorMissing.ice:13 error: missing declarator
-DeclaratorMissing.ice:13 error: missing declarator
-DeclaratorMissing.ice:14 error: missing declarator
-DeclaratorMissing.ice:14 error: missing declarator
+DeclaratorMissing.ice:13: missing declarator +DeclaratorMissing.ice:13: missing declarator +DeclaratorMissing.ice:14: missing declarator +DeclaratorMissing.ice:14: missing declarator diff --git a/cpp/test/Slice/errorDetection/EnumRedefinition.err b/cpp/test/Slice/errorDetection/EnumRedefinition.err index 53f84ad9bf2..35c20451551 100644 --- a/cpp/test/Slice/errorDetection/EnumRedefinition.err +++ b/cpp/test/Slice/errorDetection/EnumRedefinition.err @@ -1 +1 @@ -EnumRedefinition.ice:12 error: redefinition of enum `Enum' +EnumRedefinition.ice:12: redefinition of enum `Enum' diff --git a/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err b/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err index 0c4994e19cd..612103bfd78 100644 --- a/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err +++ b/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err @@ -1,2 +1,2 @@ -EnumeratorRedefinition.ice:12 error: redefinition of enumerator `B' -EnumeratorRedefinition.ice:12 error: redefinition of enumerator `A' +EnumeratorRedefinition.ice:12: redefinition of enumerator `B' +EnumeratorRedefinition.ice:12: redefinition of enumerator `A' diff --git a/cpp/test/Slice/errorDetection/InterfaceMismatch.err b/cpp/test/Slice/errorDetection/InterfaceMismatch.err index 1d0c1c784bc..f1121272623 100644 --- a/cpp/test/Slice/errorDetection/InterfaceMismatch.err +++ b/cpp/test/Slice/errorDetection/InterfaceMismatch.err @@ -1,6 +1,6 @@ -InterfaceMismatch.ice:12 error: class `Foo1' was declared as interface -InterfaceMismatch.ice:13 error: class `Foo1' was declared as interface -InterfaceMismatch.ice:16 error: class `Foo2' was defined as interface -InterfaceMismatch.ice:19 error: interface `Foo3' was declared as class -InterfaceMismatch.ice:20 error: interface `Foo3' was declared as class -InterfaceMismatch.ice:23 error: interface `Foo4' was defined as class +InterfaceMismatch.ice:12: class `Foo1' was declared as interface +InterfaceMismatch.ice:13: class `Foo1' was declared as interface +InterfaceMismatch.ice:16: class `Foo2' was defined as interface +InterfaceMismatch.ice:19: interface `Foo3' was declared as class +InterfaceMismatch.ice:20: interface `Foo3' was declared as class +InterfaceMismatch.ice:23: interface `Foo4' was defined as class diff --git a/cpp/test/Slice/errorDetection/InterfaceRedefinition.err b/cpp/test/Slice/errorDetection/InterfaceRedefinition.err index 9a1f2ed03ae..7d2e590308f 100644 --- a/cpp/test/Slice/errorDetection/InterfaceRedefinition.err +++ b/cpp/test/Slice/errorDetection/InterfaceRedefinition.err @@ -1,2 +1,2 @@ -InterfaceRedefinition.ice:12 error: redefinition of interface `Intf1' -InterfaceRedefinition.ice:16 error: redefinition of interface `Intf2' +InterfaceRedefinition.ice:12: redefinition of interface `Intf1' +InterfaceRedefinition.ice:16: redefinition of interface `Intf2' diff --git a/cpp/test/Slice/errorDetection/LocalMistmatch.err b/cpp/test/Slice/errorDetection/LocalMistmatch.err index 7b9567b508a..ce2b6022644 100644 --- a/cpp/test/Slice/errorDetection/LocalMistmatch.err +++ b/cpp/test/Slice/errorDetection/LocalMistmatch.err @@ -1,12 +1,12 @@ -LocalMistmatch.ice:12 error: local `Intf1' was declared non-local -LocalMistmatch.ice:13 error: local `Intf1' was declared non-local -LocalMistmatch.ice:16 error: local `Intf2' was defined non-local -LocalMistmatch.ice:19 error: non-local `Intf3' was declared local -LocalMistmatch.ice:20 error: non-local `Intf3' was declared local -LocalMistmatch.ice:23 error: non-local `Intf4' was defined local -LocalMistmatch.ice:26 error: local `Class1' was declared non-local -LocalMistmatch.ice:27 error: local `Class1' was declared non-local -LocalMistmatch.ice:30 error: local `Class2' was defined non-local -LocalMistmatch.ice:33 error: non-local `Class3' was declared local -LocalMistmatch.ice:34 error: non-local `Class3' was declared local -LocalMistmatch.ice:37 error: non-local `Class4' was defined local +LocalMistmatch.ice:12: local `Intf1' was declared non-local +LocalMistmatch.ice:13: local `Intf1' was declared non-local +LocalMistmatch.ice:16: local `Intf2' was defined non-local +LocalMistmatch.ice:19: non-local `Intf3' was declared local +LocalMistmatch.ice:20: non-local `Intf3' was declared local +LocalMistmatch.ice:23: non-local `Intf4' was defined local +LocalMistmatch.ice:26: local `Class1' was declared non-local +LocalMistmatch.ice:27: local `Class1' was declared non-local +LocalMistmatch.ice:30: local `Class2' was defined non-local +LocalMistmatch.ice:33: non-local `Class3' was declared local +LocalMistmatch.ice:34: non-local `Class3' was declared local +LocalMistmatch.ice:37: non-local `Class4' was defined local diff --git a/cpp/test/Slice/errorDetection/NativeRedefinition.err b/cpp/test/Slice/errorDetection/NativeRedefinition.err index 9ed1e3c4a1d..a6de34b93bb 100644 --- a/cpp/test/Slice/errorDetection/NativeRedefinition.err +++ b/cpp/test/Slice/errorDetection/NativeRedefinition.err @@ -1 +1 @@ -NativeRedefinition.ice:12 error: redefinition of native `Native' +NativeRedefinition.ice:12: redefinition of native `Native' diff --git a/cpp/test/Slice/errorDetection/NotClassOrInterface.err b/cpp/test/Slice/errorDetection/NotClassOrInterface.err index d48d8f62b9e..922573aab1c 100644 --- a/cpp/test/Slice/errorDetection/NotClassOrInterface.err +++ b/cpp/test/Slice/errorDetection/NotClassOrInterface.err @@ -1,9 +1,9 @@ -NotClassOrInterface.ice:15 error: `Vector' is not an interface -NotClassOrInterface.ice:16 error: `Vector' is not a class -NotClassOrInterface.ice:17 error: `Vector3' is not an interface -NotClassOrInterface.ice:17 error: `Vector2' is not an interface -NotClassOrInterface.ice:17 error: `Vector1' is not an interface -NotClassOrInterface.ice:18 error: `Vector' is not a class -NotClassOrInterface.ice:18 error: `Vector3' is not an interface -NotClassOrInterface.ice:18 error: `Vector2' is not an interface -NotClassOrInterface.ice:18 error: `Vector1' is not an interface +NotClassOrInterface.ice:15: `Vector' is not an interface +NotClassOrInterface.ice:16: `Vector' is not a class +NotClassOrInterface.ice:17: `Vector3' is not an interface +NotClassOrInterface.ice:17: `Vector2' is not an interface +NotClassOrInterface.ice:17: `Vector1' is not an interface +NotClassOrInterface.ice:18: `Vector' is not a class +NotClassOrInterface.ice:18: `Vector3' is not an interface +NotClassOrInterface.ice:18: `Vector2' is not an interface +NotClassOrInterface.ice:18: `Vector1' is not an interface diff --git a/cpp/test/Slice/errorDetection/NotType.err b/cpp/test/Slice/errorDetection/NotType.err index 04b37362c28..4431e23024a 100644 --- a/cpp/test/Slice/errorDetection/NotType.err +++ b/cpp/test/Slice/errorDetection/NotType.err @@ -1,10 +1,10 @@ -NotType.ice:17 error: `Module' is not a type -NotType.ice:18 error: `Module' is not a type -NotType.ice:19 error: `Module' is not a type -NotType.ice:20 error: `Module3' is not a type -NotType.ice:20 error: `Module2' is not a type -NotType.ice:20 error: `Module1' is not a type -NotType.ice:21 error: `Module' is not a type -NotType.ice:21 error: `Module3' is not a type -NotType.ice:21 error: `Module2' is not a type -NotType.ice:21 error: `Module1' is not a type +NotType.ice:17: `Module' is not a type +NotType.ice:18: `Module' is not a type +NotType.ice:19: `Module' is not a type +NotType.ice:20: `Module3' is not a type +NotType.ice:20: `Module2' is not a type +NotType.ice:20: `Module1' is not a type +NotType.ice:21: `Module' is not a type +NotType.ice:21: `Module3' is not a type +NotType.ice:21: `Module2' is not a type +NotType.ice:21: `Module1' is not a type diff --git a/cpp/test/Slice/errorDetection/OperationRedefinition.err b/cpp/test/Slice/errorDetection/OperationRedefinition.err index ef0b255726f..07111f1861e 100644 --- a/cpp/test/Slice/errorDetection/OperationRedefinition.err +++ b/cpp/test/Slice/errorDetection/OperationRedefinition.err @@ -1 +1 @@ -OperationRedefinition.ice:14 error: redefinition of operation `operation' +OperationRedefinition.ice:14: redefinition of operation `operation' diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsClass.err b/cpp/test/Slice/errorDetection/RedefinitionAsClass.err index c99fb95e30d..29968e88b63 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsClass.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsClass.err @@ -1,2 +1,2 @@ -RedefinitionAsClass.ice:12 error: declaration of already defined `Vector1' as class -RedefinitionAsClass.ice:15 error: redefinition of `Vector2' as class +RedefinitionAsClass.ice:12: declaration of already defined `Vector1' as class +RedefinitionAsClass.ice:15: redefinition of `Vector2' as class diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err b/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err index fe1a425c543..d62560b5a46 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err @@ -1 +1 @@ -RedefinitionAsDataMember.ice:14 error: redefinition of `operation' as data member +RedefinitionAsDataMember.ice:14: redefinition of `operation' as data member diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err b/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err index 4abeb75e4d8..5fd5b46c14d 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err @@ -1 +1 @@ -RedefinitionAsEnum.ice:12 error: redefinition of `Class' as enum +RedefinitionAsEnum.ice:12: redefinition of `Class' as enum diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err b/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err index 9445f69c0d2..3f790dad41c 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err @@ -1,2 +1,2 @@ -RedefinitionAsEnumerator.ice:13 error: redefinition of `Vector' as enumerator -RedefinitionAsEnumerator.ice:13 error: redefinition of `Class' as enumerator +RedefinitionAsEnumerator.ice:13: redefinition of `Vector' as enumerator +RedefinitionAsEnumerator.ice:13: redefinition of `Class' as enumerator diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err b/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err index 7bdb8dfecb0..0f7ef12d1b8 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err @@ -1,2 +1,2 @@ -RedefinitionAsInterface.ice:12 error: declaration of already defined `Vector1' as interface -RedefinitionAsInterface.ice:15 error: redefinition of `Vector2' as interface +RedefinitionAsInterface.ice:12: declaration of already defined `Vector1' as interface +RedefinitionAsInterface.ice:15: redefinition of `Vector2' as interface diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsModule.err b/cpp/test/Slice/errorDetection/RedefinitionAsModule.err index fb9665455ea..52bddb9bd0b 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsModule.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsModule.err @@ -1 +1 @@ -RedefinitionAsModule.ice:12 error: redefinition of `Vector' as module +RedefinitionAsModule.ice:12: redefinition of `Vector' as module diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsNative.err b/cpp/test/Slice/errorDetection/RedefinitionAsNative.err index 34de406fee9..09005179f29 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsNative.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsNative.err @@ -1 +1 @@ -RedefinitionAsNative.ice:12 error: redefinition of `Class' as native +RedefinitionAsNative.ice:12: redefinition of `Class' as native diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err b/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err index f91636e2eb6..ab40ead2184 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err @@ -1 +1 @@ -RedefinitionAsOperation.ice:14 error: redefinition of `member' as operation +RedefinitionAsOperation.ice:14: redefinition of `member' as operation diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsVector.err b/cpp/test/Slice/errorDetection/RedefinitionAsVector.err index 72250a5a452..7959fbf9476 100644 --- a/cpp/test/Slice/errorDetection/RedefinitionAsVector.err +++ b/cpp/test/Slice/errorDetection/RedefinitionAsVector.err @@ -1 +1 @@ -RedefinitionAsVector.ice:12 error: redefinition of `Class' as vector +RedefinitionAsVector.ice:12: redefinition of `Class' as vector diff --git a/cpp/test/Slice/errorDetection/Undefined.err b/cpp/test/Slice/errorDetection/Undefined.err index 55a50680da6..ecdcedd3197 100644 --- a/cpp/test/Slice/errorDetection/Undefined.err +++ b/cpp/test/Slice/errorDetection/Undefined.err @@ -1,10 +1,10 @@ -Undefined.ice:11 error: `Foo' is not defined -Undefined.ice:12 error: `Foo' is not defined -Undefined.ice:13 error: `Foo' is not defined -Undefined.ice:14 error: `Foo3' is not defined -Undefined.ice:14 error: `Foo2' is not defined -Undefined.ice:14 error: `Foo1' is not defined -Undefined.ice:15 error: `Foo' is not defined -Undefined.ice:15 error: `Foo3' is not defined -Undefined.ice:15 error: `Foo2' is not defined -Undefined.ice:15 error: `Foo1' is not defined +Undefined.ice:11: `Foo' is not defined +Undefined.ice:12: `Foo' is not defined +Undefined.ice:13: `Foo' is not defined +Undefined.ice:14: `Foo3' is not defined +Undefined.ice:14: `Foo2' is not defined +Undefined.ice:14: `Foo1' is not defined +Undefined.ice:15: `Foo' is not defined +Undefined.ice:15: `Foo3' is not defined +Undefined.ice:15: `Foo2' is not defined +Undefined.ice:15: `Foo1' is not defined diff --git a/cpp/test/Slice/errorDetection/VectorRedefinition.err b/cpp/test/Slice/errorDetection/VectorRedefinition.err index 33675a9f621..d0d4f02327f 100644 --- a/cpp/test/Slice/errorDetection/VectorRedefinition.err +++ b/cpp/test/Slice/errorDetection/VectorRedefinition.err @@ -1 +1 @@ -VectorRedefinition.ice:12 error: redefinition of vector `Vector' +VectorRedefinition.ice:12: redefinition of vector `Vector' diff --git a/cpp/test/Slice/errorDetection/WrongProxyType.err b/cpp/test/Slice/errorDetection/WrongProxyType.err index 835b4a08b17..08d4209fe4d 100644 --- a/cpp/test/Slice/errorDetection/WrongProxyType.err +++ b/cpp/test/Slice/errorDetection/WrongProxyType.err @@ -1,3 +1,3 @@ -WrongProxyType.ice:15 error: `Vector' must be class or interface -WrongProxyType.ice:16 error: `Vector' must be class or interface -WrongProxyType.ice:17 error: `Vector' must be class or interface +WrongProxyType.ice:15: `Vector' must be class or interface +WrongProxyType.ice:16: `Vector' must be class or interface +WrongProxyType.ice:17: `Vector' must be class or interface diff --git a/cpp/test/Slice/errorDetection/run.py b/cpp/test/Slice/errorDetection/run.py index 713818fa60d..65d56b05688 100755 --- a/cpp/test/Slice/errorDetection/run.py +++ b/cpp/test/Slice/errorDetection/run.py @@ -39,11 +39,10 @@ for file in files: continue regex2 = re.compile(r"^.*(?=" + file + ")") - diffs = "" i = 0 - while i < len(lines1) and i < len(lines2): - line1 = regex2.sub("", lines1[i]) - line2 = regex2.sub("", lines2[i]) + while i < len(lines1): + line1 = regex2.sub("", lines1[i]).strip() + line2 = regex2.sub("", lines2[i]).strip() if line1 != line2: print "failed!" break |