diff options
Diffstat (limited to 'cpp/src')
74 files changed, 992 insertions, 971 deletions
diff --git a/cpp/src/Glacier2/FilterI.h b/cpp/src/Glacier2/FilterI.h index a0d75043be3..8c376e40847 100644 --- a/cpp/src/Glacier2/FilterI.h +++ b/cpp/src/Glacier2/FilterI.h @@ -16,6 +16,10 @@ #include <vector> #include <list> +#ifdef _MSC_VER +# pragma warning(disable:4505) // unreferenced local function has been removed +#endif + namespace Glacier2 { diff --git a/cpp/src/Ice/ACM.cpp b/cpp/src/Ice/ACM.cpp index 4048d17ab82..2b106c0d5ae 100644 --- a/cpp/src/Ice/ACM.cpp +++ b/cpp/src/Ice/ACM.cpp @@ -307,7 +307,7 @@ IceInternal::ConnectionACMMonitor::~ConnectionACMMonitor() } void -IceInternal::ConnectionACMMonitor::add(ICE_MAYBE_UNUSED const ConnectionIPtr& connection) +IceInternal::ConnectionACMMonitor::add(const ConnectionIPtr& connection) { Lock sync(*this); assert(!_connection && connection); @@ -321,6 +321,9 @@ IceInternal::ConnectionACMMonitor::add(ICE_MAYBE_UNUSED const ConnectionIPtr& co void IceInternal::ConnectionACMMonitor::remove(ICE_MAYBE_UNUSED const ConnectionIPtr& connection) { +#ifdef _MSC_VER + UNREFERENCED_PARAMETER(connection); +#endif Lock sync(*this); assert(_connection == connection); if(_config.timeout != IceUtil::Time()) diff --git a/cpp/src/Ice/ImplicitContextI.cpp b/cpp/src/Ice/ImplicitContextI.cpp index 19a5eb9a81d..f9354b8329a 100644 --- a/cpp/src/Ice/ImplicitContextI.cpp +++ b/cpp/src/Ice/ImplicitContextI.cpp @@ -126,7 +126,6 @@ ImplicitContextI::create(const std::string& kind) throw Ice::InitializationException( __FILE__, __LINE__, "'" + kind + "' is not a valid value for Ice.ImplicitContext"); - return 0; // Keep the compiler happy. } } diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index 8f0efd735fa..3e6332b8a34 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -203,9 +203,9 @@ MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& prop } MetricsMapI::MetricsMapI(const MetricsMapI& map) : -#ifdef ICE_CPP11_MAPPING +#if defined(ICE_CPP11_MAPPING) std::enable_shared_from_this<MetricsMapI>(), -#else +#elif defined(__GNUC__) IceUtil::Shared(), #endif _properties(map._properties), diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 1a943d09271..4d99ae515d8 100755 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -30,6 +30,11 @@ #include <IceUtil/Random.h> #include <functional> +// TODO: fix this warning +#if defined(_MSC_VER) +# pragma warning(disable:4244) // 'argument': conversion from 'int' to 'u_short', possible loss of data +#endif + #if defined(ICE_OS_UWP) # include <IceUtil/InputUtil.h> #elif defined(_WIN32) @@ -224,8 +229,6 @@ setTcpLoopbackFastPath(SOCKET fd) SOCKET createSocketImpl(bool udp, int) { - SOCKET fd; - if(udp) { return ref new DatagramSocket(); @@ -237,8 +240,6 @@ createSocketImpl(bool udp, int) socket->Control->NoDelay = true; return socket; } - - return fd; } #else SOCKET @@ -1731,7 +1732,7 @@ IceInternal::getHostsForEndpointExpand(const string& host, ProtocolSupport proto } vector<string> -IceInternal::getInterfacesForMulticast(const string& intf, ProtocolSupport protocolSupport) +IceInternal::getInterfacesForMulticast(const string& intf, ProtocolSupport) { vector<string> interfaces; if(intf.empty() || intf == "0.0.0.0" || intf == "::" || intf == "0:0:0:0:0:0:0:0") @@ -1857,7 +1858,7 @@ IceInternal::getPort(const Address& addr) return -1; } #else - IceUtil::Int64 port; + IceUtil::Int64 port = 0; // // Don't need to use any string converter here as the port number use just ASCII characters. // diff --git a/cpp/src/Ice/NetworkProxy.cpp b/cpp/src/Ice/NetworkProxy.cpp index 4c974e04654..b7fc3db57db 100644 --- a/cpp/src/Ice/NetworkProxy.cpp +++ b/cpp/src/Ice/NetworkProxy.cpp @@ -303,6 +303,7 @@ IceInternal::createNetworkProxy(const Ice::PropertiesPtr& properties, ProtocolSu if(!proxyHost.empty()) { #ifdef ICE_OS_UWP + UNREFERENCED_PARAMETER(protocolSupport); throw Ice::InitializationException(__FILE__, __LINE__, "SOCKS proxy not supported with UWP"); #else if(protocolSupport == EnableIPv6) diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 2b61e21d5f3..1c7d9840e47 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -118,7 +118,6 @@ Ice::ObjectPtr Ice::Object::ice_clone() const { throw CloneNotImplementedException(__FILE__, __LINE__); - return 0; // avoid warning with some compilers } Ice::SlicedDataPtr diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 6e35deb5fb1..98a55fdb433 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -672,77 +672,66 @@ ReferencePtr IceInternal::FixedReference::changeEndpoints(const vector<EndpointIPtr>& /*newEndpoints*/) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeAdapterId(const string& /*newAdapterId*/) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeLocator(const LocatorPrxPtr&) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeRouter(const RouterPrxPtr&) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeCollocationOptimized(bool) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeCacheConnection(bool) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changePreferSecure(bool) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeEndpointSelection(EndpointSelectionType) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeLocatorCacheTimeout(int) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeTimeout(int) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeConnectionId(const string&) const { throw FixedProxyException(__FILE__, __LINE__); - return 0; // Keep the compiler happy. } ReferencePtr @@ -779,9 +768,6 @@ PropertyDict IceInternal::FixedReference::toProperty(const string&) const { throw FixedProxyException(__FILE__, __LINE__); - - assert(false); // Cannot be reached. - return PropertyDict(); // To keep the compiler from complaining. } RequestHandlerPtr diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 21acbf36ea1..dd83f38d42d 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -541,8 +541,6 @@ IceInternal::ReferenceFactory::create(const string& str, const string& propertyP throw ProxyParseException(__FILE__, __LINE__, "malformed proxy `" + s + "'"); } } - - return 0; // Unreachable, prevents compiler warning. } ReferencePtr diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp index 8f16bdd3a12..d79db112b15 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -177,7 +177,7 @@ Selector::getNextHandler(SocketOperation& status, int timeout) { status = info->status; } - count = SOCKET_ERROR; + count = static_cast<DWORD>(SOCKET_ERROR); error = WSAGetLastError(); return reinterpret_cast<EventHandler*>(key); } diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index a6b6d70493a..9e87ba4a68f 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -567,7 +567,6 @@ Ice::Service::main(int argc, const char* const argv[], const InitializationData& // First check for the --service option. // string name; - string eventLogSource; int idx = 1; const StringConverterPtr stringConverter = getProcessStringConverter(); while(idx < av.argc) diff --git a/cpp/src/Ice/StreamSocket.cpp b/cpp/src/Ice/StreamSocket.cpp index dd6c1a66546..6067670d20d 100755 --- a/cpp/src/Ice/StreamSocket.cpp +++ b/cpp/src/Ice/StreamSocket.cpp @@ -542,7 +542,7 @@ StreamSocket::startWrite(Buffer& buf) { checkErrorCode(__FILE__, __LINE__, ex->HResult); } - return packetSize == static_cast<int>(buf.b.end() - buf.i); + return packetSize == static_cast<size_t>(buf.b.end() - buf.i); } void diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index e80c1bed13f..dc965a78033 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -506,6 +506,8 @@ IceInternal::ThreadPool::finish(const EventHandlerPtr& handler, bool closeNow) _workQueue->queue(new FinishedWorkItem(handler, !closeNow)); return closeNow; #else + UNREFERENCED_PARAMETER(closeNow); + // If there are no pending asynchronous operations, we can call finish on the handler now. if(!handler->_pending) { diff --git a/cpp/src/Ice/UdpConnector.cpp b/cpp/src/Ice/UdpConnector.cpp index 3159fd6e7e4..c48501d2f68 100644 --- a/cpp/src/Ice/UdpConnector.cpp +++ b/cpp/src/Ice/UdpConnector.cpp @@ -131,6 +131,9 @@ IceInternal::UdpConnector::UdpConnector(const ProtocolInstancePtr& instance, con _mcastTtl(mcastTtl), _connectionId(connectionId) { +#ifdef ICE_OS_UWP + UNREFERENCED_PARAMETER(sourceAddr); +#endif } IceInternal::UdpConnector::~UdpConnector() diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index 64c2a756bc1..a48c8b017e4 100755 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -56,6 +56,7 @@ IceInternal::UdpTransceiver::getAsyncInfo(SocketOperation status) return 0; } #elif defined(ICE_OS_UWP) + UNREFERENCED_PARAMETER(status); return &_write; #endif } @@ -499,8 +500,8 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) } } } -#endif return true; +#endif } #ifdef ICE_OS_UWP @@ -587,7 +588,7 @@ IceInternal::UdpTransceiver::finishWrite(Buffer& buf) #endif } - assert(_write.count == buf.b.size()); + assert(static_cast<size_t>(_write.count) == buf.b.size()); buf.i = buf.b.end(); } @@ -661,7 +662,7 @@ IceInternal::UdpTransceiver::finishRead(Buffer& buf) DatagramSocketMessageReceivedEventArgs^ args = _received.front(); _received.pop_front(); - int ret; + int ret = 0; try { DataReader^ reader = args->GetDataReader(); diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp index b9e8d716eab..ec2da6d6cd5 100644 --- a/cpp/src/Ice/WSTransceiver.cpp +++ b/cpp/src/Ice/WSTransceiver.cpp @@ -1470,7 +1470,7 @@ IceInternal::WSTransceiver::preWrite(Buffer& buf) return false; } - assert(buf.i = buf.b.begin()); + assert(buf.i == buf.b.begin()); prepareWriteHeader(OP_DATA, buf.b.size()); _writeState = WriteStatePayload; diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index 1bfdb899f5d..d8f5c3cdcc0 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -839,6 +839,10 @@ IceBox::ServiceManagerI::stopAll() // leak detector doesn't report potential leaks, and the communicator must be destroyed before // the library is released since the library will destroy its global state. // + +#ifdef ICE_CPP11_MAPPING + info.service = 0; +#else try { info.service = 0; @@ -854,7 +858,7 @@ IceBox::ServiceManagerI::stopAll() Warning out(_logger); out << "ServiceManager: unknown exception while stopping service " << info.name; } - +#endif if(info.communicator) { removeAdminFacets("IceBox.Service." + info.name + "."); @@ -884,15 +888,7 @@ IceBox::ServiceManagerI::stopAll() { removeAdminFacets("IceBox.SharedCommunicator."); - try - { - _sharedCommunicator->destroy(); - } - catch(const std::exception& ex) - { - Warning out(_logger); - out << "ServiceManager: exception while destroying shared communicator:\n" << ex; - } + _sharedCommunicator->destroy(); _sharedCommunicator = 0; } diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index 70e46eaa86b..c6b860e5f1a 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -264,7 +264,6 @@ stringToSignal(const string& str) } } throw BadSignalException("unknown signal `" + str + "'"); - return SIGTERM; // Keep the compiler happy. } } diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index 22184a46f4c..a1d1b8e6f34 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -802,7 +802,6 @@ AdminI::getNodeLoad(const string& name, const Current&) const os << ex; throw NodeUnreachableException(name, os.str()); } - return LoadInfo(); // Keep the compiler happy. } int @@ -865,7 +864,6 @@ AdminI::getNodeHostname(const string& name, const Current&) const ostringstream os; os << ex; throw NodeUnreachableException(name, os.str()); - return ""; // Keep the compiler happy. } } @@ -926,7 +924,6 @@ AdminI::pingRegistry(const string& name, const Current&) const { return false; } - return false; } void diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp index bfb29c4c18f..12dec88b1de 100644 --- a/cpp/src/IceGrid/AdminSessionI.cpp +++ b/cpp/src/IceGrid/AdminSessionI.cpp @@ -101,7 +101,6 @@ FileIteratorI::read(int size, Ice::StringSeq& lines, const Ice::Current&) os << ex; throw FileNotAvailableException(os.str()); } - return false; // Keep the compiler happy. } void @@ -291,7 +290,6 @@ AdminSessionI::openServerLog(const string& id, const string& path, int nLines, c catch(const SynchronizationException&) { throw DeploymentException("server is being updated"); - return 0; } } @@ -305,7 +303,6 @@ AdminSessionI::openServerStdOut(const string& id, int nLines, const Ice::Current catch(const SynchronizationException&) { throw DeploymentException("server is being updated"); - return 0; } } @@ -319,7 +316,6 @@ AdminSessionI::openServerStdErr(const string& id, int nLines, const Ice::Current catch(const SynchronizationException&) { throw DeploymentException("server is being updated"); - return 0; } } diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index c25c84d690b..d2ed8a7e065 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -220,7 +220,7 @@ getPassword(const string& prompt) tcsetattr(0, TCSANOW, &oldConf); #else char c; - while((c = _getch()) != '\r') + while((c = static_cast<char>(_getch())) != '\r') { password += c; } diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index aaa34ddde23..0af83f123b0 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -546,8 +546,6 @@ Database::getApplications(Ice::Long& serial) logError(_communicator, ex); throw; } - assert(false); - return ApplicationInfoSeq(); } AdapterInfoSeq @@ -565,8 +563,6 @@ Database::getAdapters(Ice::Long& serial) logError(_communicator, ex); throw; } - assert(false); - return AdapterInfoSeq(); } ObjectInfoSeq @@ -584,8 +580,6 @@ Database::getObjects(Ice::Long& serial) logError(_communicator, ex); throw; } - assert(false); - return ObjectInfoSeq(); } StringLongDict diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp index 9ffc5819294..79fe234bc50 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.cpp +++ b/cpp/src/IceGrid/DescriptorBuilder.cpp @@ -105,7 +105,6 @@ XmlAttributesHelper::asBool(const string& name) const if(p == _attributes.end()) { throw invalid_argument("missing attribute '" + name + "'"); - return true; // Keep the compiler happy. } else if(p->second == "true") { @@ -118,7 +117,6 @@ XmlAttributesHelper::asBool(const string& name) const else { throw invalid_argument("invalid attribute `" + name + "': value is not 'false' or 'true'"); - return true; // Keep the compiler happy. } } @@ -142,7 +140,6 @@ XmlAttributesHelper::asBool(const string& name, bool def) const else { throw invalid_argument("invalid attribute `" + name + "': value is not 'false' or 'true'"); - return true; // Keep the compiler happy. } } @@ -855,14 +852,12 @@ ServiceDescriptorBuilder* ServerDescriptorBuilder::createService(const XmlAttributesHelper& /*attrs*/) { throw invalid_argument("<service> element can only be a child of an <icebox> element"); - return 0; } ServiceInstanceDescriptorBuilder* ServerDescriptorBuilder::createServiceInstance(const XmlAttributesHelper& /*attrs*/) { throw invalid_argument("<service-instance> element can only be a child of an <icebox> element"); - return 0; } void diff --git a/cpp/src/IceGrid/FileParserI.cpp b/cpp/src/IceGrid/FileParserI.cpp index 6380f190dad..aaf2f99dbd5 100644 --- a/cpp/src/IceGrid/FileParserI.cpp +++ b/cpp/src/IceGrid/FileParserI.cpp @@ -26,6 +26,5 @@ FileParserI::parse(const string& file, const AdminPrx& admin, const Ice::Current catch(const IceXML::ParserException& e) { throw ParseException(e.reason()); - return ApplicationDescriptor(); } } diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp index b960b01f4c4..ab02049ca06 100644 --- a/cpp/src/IceGrid/Grammar.cpp +++ b/cpp/src/IceGrid/Grammar.cpp @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -79,11 +79,14 @@ #include <IceGrid/Parser.h> #ifdef _MSC_VER -// I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label -# pragma warning( disable : 4102 ) +# pragma warning(disable:4102) // warning C4065: switch statement contains 'default' but no 'case' labels -# pragma warning( disable : 4065 ) +# pragma warning(disable:4065) +// warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data +# pragma warning(disable:4244) +// warning C4702: unreachable code +# pragma warning(disable:4702) #endif // @@ -105,7 +108,7 @@ yyerror(const char* s) /* Line 371 of yacc.c */ -#line 109 "src/IceGrid/Grammar.cpp" +#line 112 "src/IceGrid/Grammar.cpp" # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -212,7 +215,7 @@ int yyparse (); /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ -#line 216 "src/IceGrid/Grammar.cpp" +#line 219 "src/IceGrid/Grammar.cpp" #ifdef short # undef short @@ -590,24 +593,24 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 95, 95, 99, 106, 109, 116, 124, 128, 132, - 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, - 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, - 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, - 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, - 296, 300, 304, 308, 312, 316, 320, 324, 328, 332, - 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, - 376, 380, 384, 388, 392, 396, 400, 404, 408, 412, - 416, 420, 424, 428, 432, 436, 440, 444, 448, 452, - 456, 460, 464, 468, 472, 476, 480, 484, 488, 492, - 496, 500, 504, 508, 512, 516, 520, 524, 528, 532, - 536, 540, 544, 548, 552, 556, 560, 564, 568, 579, - 583, 594, 605, 609, 613, 617, 623, 628, 633, 637, - 646, 651, 656, 662, 669, 677, 680, 683, 686, 689, - 692, 695, 698, 701, 704, 707, 710, 713, 716, 719, - 722, 725, 728, 731, 734, 737, 740, 743, 746, 749, - 752, 755, 758, 761, 764, 767, 770, 773, 776, 779, - 782, 785, 788 + 0, 98, 98, 102, 109, 112, 119, 127, 131, 135, + 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, + 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, + 219, 223, 227, 231, 235, 239, 243, 247, 251, 255, + 259, 263, 267, 271, 275, 279, 283, 287, 291, 295, + 299, 303, 307, 311, 315, 319, 323, 327, 331, 335, + 339, 343, 347, 351, 355, 359, 363, 367, 371, 375, + 379, 383, 387, 391, 395, 399, 403, 407, 411, 415, + 419, 423, 427, 431, 435, 439, 443, 447, 451, 455, + 459, 463, 467, 471, 475, 479, 483, 487, 491, 495, + 499, 503, 507, 511, 515, 519, 523, 527, 531, 535, + 539, 543, 547, 551, 555, 559, 563, 567, 571, 582, + 586, 597, 608, 612, 616, 620, 626, 631, 636, 640, + 648, 653, 658, 664, 671, 679, 682, 685, 688, 691, + 694, 697, 700, 703, 706, 709, 712, 715, 718, 721, + 724, 727, 730, 733, 736, 739, 742, 745, 748, 751, + 754, 757, 760, 763, 766, 769, 772, 775, 778, 781, + 784, 787, 790 }; #endif @@ -2189,35 +2192,35 @@ yyreduce: { case 2: /* Line 1792 of yacc.c */ -#line 96 "src/IceGrid/Grammar.y" +#line 99 "src/IceGrid/Grammar.y" { } break; case 3: /* Line 1792 of yacc.c */ -#line 99 "src/IceGrid/Grammar.y" +#line 102 "src/IceGrid/Grammar.y" { } break; case 4: /* Line 1792 of yacc.c */ -#line 107 "src/IceGrid/Grammar.y" +#line 110 "src/IceGrid/Grammar.y" { } break; case 5: /* Line 1792 of yacc.c */ -#line 110 "src/IceGrid/Grammar.y" +#line 113 "src/IceGrid/Grammar.y" { } break; case 6: /* Line 1792 of yacc.c */ -#line 116 "src/IceGrid/Grammar.y" +#line 119 "src/IceGrid/Grammar.y" { parser->checkInterrupted(); } @@ -2225,7 +2228,7 @@ yyreduce: case 7: /* Line 1792 of yacc.c */ -#line 125 "src/IceGrid/Grammar.y" +#line 128 "src/IceGrid/Grammar.y" { parser->usage(); } @@ -2233,7 +2236,7 @@ yyreduce: case 8: /* Line 1792 of yacc.c */ -#line 129 "src/IceGrid/Grammar.y" +#line 132 "src/IceGrid/Grammar.y" { return 0; } @@ -2241,7 +2244,7 @@ yyreduce: case 9: /* Line 1792 of yacc.c */ -#line 133 "src/IceGrid/Grammar.y" +#line 136 "src/IceGrid/Grammar.y" { parser->addApplication((yyvsp[(3) - (4)])); } @@ -2249,7 +2252,7 @@ yyreduce: case 10: /* Line 1792 of yacc.c */ -#line 137 "src/IceGrid/Grammar.y" +#line 140 "src/IceGrid/Grammar.y" { parser->usage("application", "add"); } @@ -2257,7 +2260,7 @@ yyreduce: case 11: /* Line 1792 of yacc.c */ -#line 141 "src/IceGrid/Grammar.y" +#line 144 "src/IceGrid/Grammar.y" { parser->removeApplication((yyvsp[(3) - (4)])); } @@ -2265,7 +2268,7 @@ yyreduce: case 12: /* Line 1792 of yacc.c */ -#line 145 "src/IceGrid/Grammar.y" +#line 148 "src/IceGrid/Grammar.y" { parser->usage("application", "remove"); } @@ -2273,7 +2276,7 @@ yyreduce: case 13: /* Line 1792 of yacc.c */ -#line 149 "src/IceGrid/Grammar.y" +#line 152 "src/IceGrid/Grammar.y" { parser->diffApplication((yyvsp[(3) - (4)])); } @@ -2281,7 +2284,7 @@ yyreduce: case 14: /* Line 1792 of yacc.c */ -#line 153 "src/IceGrid/Grammar.y" +#line 156 "src/IceGrid/Grammar.y" { parser->usage("application", "diff"); } @@ -2289,7 +2292,7 @@ yyreduce: case 15: /* Line 1792 of yacc.c */ -#line 157 "src/IceGrid/Grammar.y" +#line 160 "src/IceGrid/Grammar.y" { parser->updateApplication((yyvsp[(3) - (4)])); } @@ -2297,7 +2300,7 @@ yyreduce: case 16: /* Line 1792 of yacc.c */ -#line 161 "src/IceGrid/Grammar.y" +#line 164 "src/IceGrid/Grammar.y" { parser->usage("application", "update"); } @@ -2305,7 +2308,7 @@ yyreduce: case 17: /* Line 1792 of yacc.c */ -#line 165 "src/IceGrid/Grammar.y" +#line 168 "src/IceGrid/Grammar.y" { parser->describeApplication((yyvsp[(3) - (4)])); } @@ -2313,7 +2316,7 @@ yyreduce: case 18: /* Line 1792 of yacc.c */ -#line 169 "src/IceGrid/Grammar.y" +#line 172 "src/IceGrid/Grammar.y" { parser->usage("application", "describe"); } @@ -2321,7 +2324,7 @@ yyreduce: case 19: /* Line 1792 of yacc.c */ -#line 173 "src/IceGrid/Grammar.y" +#line 176 "src/IceGrid/Grammar.y" { parser->patchApplication((yyvsp[(3) - (4)])); } @@ -2329,7 +2332,7 @@ yyreduce: case 20: /* Line 1792 of yacc.c */ -#line 177 "src/IceGrid/Grammar.y" +#line 180 "src/IceGrid/Grammar.y" { parser->usage("application", "patch"); } @@ -2337,7 +2340,7 @@ yyreduce: case 21: /* Line 1792 of yacc.c */ -#line 181 "src/IceGrid/Grammar.y" +#line 184 "src/IceGrid/Grammar.y" { parser->listAllApplications((yyvsp[(3) - (4)])); } @@ -2345,7 +2348,7 @@ yyreduce: case 22: /* Line 1792 of yacc.c */ -#line 185 "src/IceGrid/Grammar.y" +#line 188 "src/IceGrid/Grammar.y" { parser->usage("application", "list"); } @@ -2353,7 +2356,7 @@ yyreduce: case 23: /* Line 1792 of yacc.c */ -#line 189 "src/IceGrid/Grammar.y" +#line 192 "src/IceGrid/Grammar.y" { parser->describeServerTemplate((yyvsp[(4) - (5)])); } @@ -2361,7 +2364,7 @@ yyreduce: case 24: /* Line 1792 of yacc.c */ -#line 193 "src/IceGrid/Grammar.y" +#line 196 "src/IceGrid/Grammar.y" { parser->usage("server template", "describe"); } @@ -2369,7 +2372,7 @@ yyreduce: case 25: /* Line 1792 of yacc.c */ -#line 197 "src/IceGrid/Grammar.y" +#line 200 "src/IceGrid/Grammar.y" { parser->instantiateServerTemplate((yyvsp[(4) - (5)])); } @@ -2377,7 +2380,7 @@ yyreduce: case 26: /* Line 1792 of yacc.c */ -#line 201 "src/IceGrid/Grammar.y" +#line 204 "src/IceGrid/Grammar.y" { parser->usage("server template", "instantiate"); } @@ -2385,7 +2388,7 @@ yyreduce: case 27: /* Line 1792 of yacc.c */ -#line 205 "src/IceGrid/Grammar.y" +#line 208 "src/IceGrid/Grammar.y" { parser->usage("server template"); } @@ -2393,7 +2396,7 @@ yyreduce: case 28: /* Line 1792 of yacc.c */ -#line 209 "src/IceGrid/Grammar.y" +#line 212 "src/IceGrid/Grammar.y" { parser->describeServiceTemplate((yyvsp[(4) - (5)])); } @@ -2401,7 +2404,7 @@ yyreduce: case 29: /* Line 1792 of yacc.c */ -#line 213 "src/IceGrid/Grammar.y" +#line 216 "src/IceGrid/Grammar.y" { parser->usage("service template", "describe"); } @@ -2409,7 +2412,7 @@ yyreduce: case 30: /* Line 1792 of yacc.c */ -#line 217 "src/IceGrid/Grammar.y" +#line 220 "src/IceGrid/Grammar.y" { parser->usage("service template"); } @@ -2417,7 +2420,7 @@ yyreduce: case 31: /* Line 1792 of yacc.c */ -#line 221 "src/IceGrid/Grammar.y" +#line 224 "src/IceGrid/Grammar.y" { parser->describeNode((yyvsp[(3) - (4)])); } @@ -2425,7 +2428,7 @@ yyreduce: case 32: /* Line 1792 of yacc.c */ -#line 225 "src/IceGrid/Grammar.y" +#line 228 "src/IceGrid/Grammar.y" { parser->usage("node", "describe"); } @@ -2433,7 +2436,7 @@ yyreduce: case 33: /* Line 1792 of yacc.c */ -#line 229 "src/IceGrid/Grammar.y" +#line 232 "src/IceGrid/Grammar.y" { parser->pingNode((yyvsp[(3) - (4)])); } @@ -2441,7 +2444,7 @@ yyreduce: case 34: /* Line 1792 of yacc.c */ -#line 233 "src/IceGrid/Grammar.y" +#line 236 "src/IceGrid/Grammar.y" { parser->usage("node", "ping"); } @@ -2449,7 +2452,7 @@ yyreduce: case 35: /* Line 1792 of yacc.c */ -#line 237 "src/IceGrid/Grammar.y" +#line 240 "src/IceGrid/Grammar.y" { parser->printLoadNode((yyvsp[(3) - (4)])); } @@ -2457,7 +2460,7 @@ yyreduce: case 36: /* Line 1792 of yacc.c */ -#line 241 "src/IceGrid/Grammar.y" +#line 244 "src/IceGrid/Grammar.y" { parser->usage("node", "load"); } @@ -2465,7 +2468,7 @@ yyreduce: case 37: /* Line 1792 of yacc.c */ -#line 245 "src/IceGrid/Grammar.y" +#line 248 "src/IceGrid/Grammar.y" { parser->printNodeProcessorSockets((yyvsp[(3) - (4)])); } @@ -2473,7 +2476,7 @@ yyreduce: case 38: /* Line 1792 of yacc.c */ -#line 249 "src/IceGrid/Grammar.y" +#line 252 "src/IceGrid/Grammar.y" { parser->usage("node", "sockets"); } @@ -2481,7 +2484,7 @@ yyreduce: case 39: /* Line 1792 of yacc.c */ -#line 253 "src/IceGrid/Grammar.y" +#line 256 "src/IceGrid/Grammar.y" { parser->shutdownNode((yyvsp[(3) - (4)])); } @@ -2489,7 +2492,7 @@ yyreduce: case 40: /* Line 1792 of yacc.c */ -#line 257 "src/IceGrid/Grammar.y" +#line 260 "src/IceGrid/Grammar.y" { parser->usage("node", "shutdown"); } @@ -2497,7 +2500,7 @@ yyreduce: case 41: /* Line 1792 of yacc.c */ -#line 261 "src/IceGrid/Grammar.y" +#line 264 "src/IceGrid/Grammar.y" { parser->listAllNodes((yyvsp[(3) - (4)])); } @@ -2505,7 +2508,7 @@ yyreduce: case 42: /* Line 1792 of yacc.c */ -#line 265 "src/IceGrid/Grammar.y" +#line 268 "src/IceGrid/Grammar.y" { parser->usage("node", "list"); } @@ -2513,7 +2516,7 @@ yyreduce: case 43: /* Line 1792 of yacc.c */ -#line 269 "src/IceGrid/Grammar.y" +#line 272 "src/IceGrid/Grammar.y" { parser->show("node", (yyvsp[(3) - (4)])); } @@ -2521,7 +2524,7 @@ yyreduce: case 44: /* Line 1792 of yacc.c */ -#line 273 "src/IceGrid/Grammar.y" +#line 276 "src/IceGrid/Grammar.y" { parser->usage("node", "show"); } @@ -2529,7 +2532,7 @@ yyreduce: case 45: /* Line 1792 of yacc.c */ -#line 277 "src/IceGrid/Grammar.y" +#line 280 "src/IceGrid/Grammar.y" { parser->describeRegistry((yyvsp[(3) - (4)])); } @@ -2537,7 +2540,7 @@ yyreduce: case 46: /* Line 1792 of yacc.c */ -#line 281 "src/IceGrid/Grammar.y" +#line 284 "src/IceGrid/Grammar.y" { parser->usage("registry", "describe"); } @@ -2545,7 +2548,7 @@ yyreduce: case 47: /* Line 1792 of yacc.c */ -#line 285 "src/IceGrid/Grammar.y" +#line 288 "src/IceGrid/Grammar.y" { parser->pingRegistry((yyvsp[(3) - (4)])); } @@ -2553,7 +2556,7 @@ yyreduce: case 48: /* Line 1792 of yacc.c */ -#line 289 "src/IceGrid/Grammar.y" +#line 292 "src/IceGrid/Grammar.y" { parser->usage("registry", "ping"); } @@ -2561,7 +2564,7 @@ yyreduce: case 49: /* Line 1792 of yacc.c */ -#line 293 "src/IceGrid/Grammar.y" +#line 296 "src/IceGrid/Grammar.y" { parser->shutdownRegistry((yyvsp[(3) - (4)])); } @@ -2569,7 +2572,7 @@ yyreduce: case 50: /* Line 1792 of yacc.c */ -#line 297 "src/IceGrid/Grammar.y" +#line 300 "src/IceGrid/Grammar.y" { parser->usage("registry", "shutdown"); } @@ -2577,7 +2580,7 @@ yyreduce: case 51: /* Line 1792 of yacc.c */ -#line 301 "src/IceGrid/Grammar.y" +#line 304 "src/IceGrid/Grammar.y" { parser->listAllRegistries((yyvsp[(3) - (4)])); } @@ -2585,7 +2588,7 @@ yyreduce: case 52: /* Line 1792 of yacc.c */ -#line 305 "src/IceGrid/Grammar.y" +#line 308 "src/IceGrid/Grammar.y" { parser->usage("registry", "list"); } @@ -2593,7 +2596,7 @@ yyreduce: case 53: /* Line 1792 of yacc.c */ -#line 309 "src/IceGrid/Grammar.y" +#line 312 "src/IceGrid/Grammar.y" { parser->show("registry", (yyvsp[(3) - (4)])); } @@ -2601,7 +2604,7 @@ yyreduce: case 54: /* Line 1792 of yacc.c */ -#line 313 "src/IceGrid/Grammar.y" +#line 316 "src/IceGrid/Grammar.y" { parser->usage("registry", "show"); } @@ -2609,7 +2612,7 @@ yyreduce: case 55: /* Line 1792 of yacc.c */ -#line 317 "src/IceGrid/Grammar.y" +#line 320 "src/IceGrid/Grammar.y" { parser->removeServer((yyvsp[(3) - (4)])); } @@ -2617,7 +2620,7 @@ yyreduce: case 56: /* Line 1792 of yacc.c */ -#line 321 "src/IceGrid/Grammar.y" +#line 324 "src/IceGrid/Grammar.y" { parser->usage("server", "remove"); } @@ -2625,7 +2628,7 @@ yyreduce: case 57: /* Line 1792 of yacc.c */ -#line 325 "src/IceGrid/Grammar.y" +#line 328 "src/IceGrid/Grammar.y" { parser->describeServer((yyvsp[(3) - (4)])); } @@ -2633,7 +2636,7 @@ yyreduce: case 58: /* Line 1792 of yacc.c */ -#line 329 "src/IceGrid/Grammar.y" +#line 332 "src/IceGrid/Grammar.y" { parser->usage("server", "describe"); } @@ -2641,7 +2644,7 @@ yyreduce: case 59: /* Line 1792 of yacc.c */ -#line 333 "src/IceGrid/Grammar.y" +#line 336 "src/IceGrid/Grammar.y" { parser->startServer((yyvsp[(3) - (4)])); } @@ -2649,7 +2652,7 @@ yyreduce: case 60: /* Line 1792 of yacc.c */ -#line 337 "src/IceGrid/Grammar.y" +#line 340 "src/IceGrid/Grammar.y" { parser->usage("server", "start"); } @@ -2657,7 +2660,7 @@ yyreduce: case 61: /* Line 1792 of yacc.c */ -#line 341 "src/IceGrid/Grammar.y" +#line 344 "src/IceGrid/Grammar.y" { parser->stopServer((yyvsp[(3) - (4)])); } @@ -2665,7 +2668,7 @@ yyreduce: case 62: /* Line 1792 of yacc.c */ -#line 345 "src/IceGrid/Grammar.y" +#line 348 "src/IceGrid/Grammar.y" { parser->usage("server", "stop"); } @@ -2673,7 +2676,7 @@ yyreduce: case 63: /* Line 1792 of yacc.c */ -#line 349 "src/IceGrid/Grammar.y" +#line 352 "src/IceGrid/Grammar.y" { parser->patchServer((yyvsp[(3) - (4)])); } @@ -2681,7 +2684,7 @@ yyreduce: case 64: /* Line 1792 of yacc.c */ -#line 353 "src/IceGrid/Grammar.y" +#line 356 "src/IceGrid/Grammar.y" { parser->usage("server", "patch"); } @@ -2689,7 +2692,7 @@ yyreduce: case 65: /* Line 1792 of yacc.c */ -#line 357 "src/IceGrid/Grammar.y" +#line 360 "src/IceGrid/Grammar.y" { parser->signalServer((yyvsp[(3) - (4)])); } @@ -2697,7 +2700,7 @@ yyreduce: case 66: /* Line 1792 of yacc.c */ -#line 361 "src/IceGrid/Grammar.y" +#line 364 "src/IceGrid/Grammar.y" { parser->usage("server", "signal"); } @@ -2705,7 +2708,7 @@ yyreduce: case 67: /* Line 1792 of yacc.c */ -#line 365 "src/IceGrid/Grammar.y" +#line 368 "src/IceGrid/Grammar.y" { parser->writeMessage((yyvsp[(3) - (4)]), 1); } @@ -2713,7 +2716,7 @@ yyreduce: case 68: /* Line 1792 of yacc.c */ -#line 369 "src/IceGrid/Grammar.y" +#line 372 "src/IceGrid/Grammar.y" { parser->usage("server", "stdout"); } @@ -2721,7 +2724,7 @@ yyreduce: case 69: /* Line 1792 of yacc.c */ -#line 373 "src/IceGrid/Grammar.y" +#line 376 "src/IceGrid/Grammar.y" { parser->writeMessage((yyvsp[(3) - (4)]), 2); } @@ -2729,7 +2732,7 @@ yyreduce: case 70: /* Line 1792 of yacc.c */ -#line 377 "src/IceGrid/Grammar.y" +#line 380 "src/IceGrid/Grammar.y" { parser->usage("server", "stderr"); } @@ -2737,7 +2740,7 @@ yyreduce: case 71: /* Line 1792 of yacc.c */ -#line 381 "src/IceGrid/Grammar.y" +#line 384 "src/IceGrid/Grammar.y" { parser->stateServer((yyvsp[(3) - (4)])); } @@ -2745,7 +2748,7 @@ yyreduce: case 72: /* Line 1792 of yacc.c */ -#line 385 "src/IceGrid/Grammar.y" +#line 388 "src/IceGrid/Grammar.y" { parser->usage("server", "start"); } @@ -2753,7 +2756,7 @@ yyreduce: case 73: /* Line 1792 of yacc.c */ -#line 389 "src/IceGrid/Grammar.y" +#line 392 "src/IceGrid/Grammar.y" { parser->pidServer((yyvsp[(3) - (4)])); } @@ -2761,7 +2764,7 @@ yyreduce: case 74: /* Line 1792 of yacc.c */ -#line 393 "src/IceGrid/Grammar.y" +#line 396 "src/IceGrid/Grammar.y" { parser->usage("server", "pid"); } @@ -2769,7 +2772,7 @@ yyreduce: case 75: /* Line 1792 of yacc.c */ -#line 397 "src/IceGrid/Grammar.y" +#line 400 "src/IceGrid/Grammar.y" { parser->propertiesServer((yyvsp[(3) - (4)]), false); } @@ -2777,7 +2780,7 @@ yyreduce: case 76: /* Line 1792 of yacc.c */ -#line 401 "src/IceGrid/Grammar.y" +#line 404 "src/IceGrid/Grammar.y" { parser->usage("server", "properties"); } @@ -2785,7 +2788,7 @@ yyreduce: case 77: /* Line 1792 of yacc.c */ -#line 405 "src/IceGrid/Grammar.y" +#line 408 "src/IceGrid/Grammar.y" { parser->propertiesServer((yyvsp[(3) - (4)]), true); } @@ -2793,7 +2796,7 @@ yyreduce: case 78: /* Line 1792 of yacc.c */ -#line 409 "src/IceGrid/Grammar.y" +#line 412 "src/IceGrid/Grammar.y" { parser->usage("server", "property"); } @@ -2801,7 +2804,7 @@ yyreduce: case 79: /* Line 1792 of yacc.c */ -#line 413 "src/IceGrid/Grammar.y" +#line 416 "src/IceGrid/Grammar.y" { parser->enableServer((yyvsp[(3) - (4)]), true); } @@ -2809,7 +2812,7 @@ yyreduce: case 80: /* Line 1792 of yacc.c */ -#line 417 "src/IceGrid/Grammar.y" +#line 420 "src/IceGrid/Grammar.y" { parser->usage("server", "enable"); } @@ -2817,7 +2820,7 @@ yyreduce: case 81: /* Line 1792 of yacc.c */ -#line 421 "src/IceGrid/Grammar.y" +#line 424 "src/IceGrid/Grammar.y" { parser->enableServer((yyvsp[(3) - (4)]), false); } @@ -2825,7 +2828,7 @@ yyreduce: case 82: /* Line 1792 of yacc.c */ -#line 425 "src/IceGrid/Grammar.y" +#line 428 "src/IceGrid/Grammar.y" { parser->usage("server", "disable"); } @@ -2833,7 +2836,7 @@ yyreduce: case 83: /* Line 1792 of yacc.c */ -#line 429 "src/IceGrid/Grammar.y" +#line 432 "src/IceGrid/Grammar.y" { parser->listAllServers((yyvsp[(3) - (4)])); } @@ -2841,7 +2844,7 @@ yyreduce: case 84: /* Line 1792 of yacc.c */ -#line 433 "src/IceGrid/Grammar.y" +#line 436 "src/IceGrid/Grammar.y" { parser->usage("server", "list"); } @@ -2849,7 +2852,7 @@ yyreduce: case 85: /* Line 1792 of yacc.c */ -#line 437 "src/IceGrid/Grammar.y" +#line 440 "src/IceGrid/Grammar.y" { parser->show("server", (yyvsp[(3) - (4)])); } @@ -2857,7 +2860,7 @@ yyreduce: case 86: /* Line 1792 of yacc.c */ -#line 441 "src/IceGrid/Grammar.y" +#line 444 "src/IceGrid/Grammar.y" { parser->usage("server", "show"); } @@ -2865,7 +2868,7 @@ yyreduce: case 87: /* Line 1792 of yacc.c */ -#line 445 "src/IceGrid/Grammar.y" +#line 448 "src/IceGrid/Grammar.y" { parser->startService((yyvsp[(3) - (4)])); } @@ -2873,7 +2876,7 @@ yyreduce: case 88: /* Line 1792 of yacc.c */ -#line 449 "src/IceGrid/Grammar.y" +#line 452 "src/IceGrid/Grammar.y" { parser->usage("service", "start"); } @@ -2881,7 +2884,7 @@ yyreduce: case 89: /* Line 1792 of yacc.c */ -#line 453 "src/IceGrid/Grammar.y" +#line 456 "src/IceGrid/Grammar.y" { parser->stopService((yyvsp[(3) - (4)])); } @@ -2889,7 +2892,7 @@ yyreduce: case 90: /* Line 1792 of yacc.c */ -#line 457 "src/IceGrid/Grammar.y" +#line 460 "src/IceGrid/Grammar.y" { parser->usage("service", "stop"); } @@ -2897,7 +2900,7 @@ yyreduce: case 91: /* Line 1792 of yacc.c */ -#line 461 "src/IceGrid/Grammar.y" +#line 464 "src/IceGrid/Grammar.y" { parser->describeService((yyvsp[(3) - (4)])); } @@ -2905,7 +2908,7 @@ yyreduce: case 92: /* Line 1792 of yacc.c */ -#line 465 "src/IceGrid/Grammar.y" +#line 468 "src/IceGrid/Grammar.y" { parser->usage("service", "describe"); } @@ -2913,7 +2916,7 @@ yyreduce: case 93: /* Line 1792 of yacc.c */ -#line 469 "src/IceGrid/Grammar.y" +#line 472 "src/IceGrid/Grammar.y" { parser->propertiesService((yyvsp[(3) - (4)]), false); } @@ -2921,7 +2924,7 @@ yyreduce: case 94: /* Line 1792 of yacc.c */ -#line 473 "src/IceGrid/Grammar.y" +#line 476 "src/IceGrid/Grammar.y" { parser->usage("service", "properties"); } @@ -2929,7 +2932,7 @@ yyreduce: case 95: /* Line 1792 of yacc.c */ -#line 477 "src/IceGrid/Grammar.y" +#line 480 "src/IceGrid/Grammar.y" { parser->propertiesService((yyvsp[(3) - (4)]), true); } @@ -2937,7 +2940,7 @@ yyreduce: case 96: /* Line 1792 of yacc.c */ -#line 481 "src/IceGrid/Grammar.y" +#line 484 "src/IceGrid/Grammar.y" { parser->usage("service", "property"); } @@ -2945,7 +2948,7 @@ yyreduce: case 97: /* Line 1792 of yacc.c */ -#line 485 "src/IceGrid/Grammar.y" +#line 488 "src/IceGrid/Grammar.y" { parser->listServices((yyvsp[(3) - (4)])); } @@ -2953,7 +2956,7 @@ yyreduce: case 98: /* Line 1792 of yacc.c */ -#line 489 "src/IceGrid/Grammar.y" +#line 492 "src/IceGrid/Grammar.y" { parser->usage("service", "list"); } @@ -2961,7 +2964,7 @@ yyreduce: case 99: /* Line 1792 of yacc.c */ -#line 493 "src/IceGrid/Grammar.y" +#line 496 "src/IceGrid/Grammar.y" { parser->endpointsAdapter((yyvsp[(3) - (4)])); } @@ -2969,7 +2972,7 @@ yyreduce: case 100: /* Line 1792 of yacc.c */ -#line 497 "src/IceGrid/Grammar.y" +#line 500 "src/IceGrid/Grammar.y" { parser->usage("adapter", "endpoints"); } @@ -2977,7 +2980,7 @@ yyreduce: case 101: /* Line 1792 of yacc.c */ -#line 501 "src/IceGrid/Grammar.y" +#line 504 "src/IceGrid/Grammar.y" { parser->removeAdapter((yyvsp[(3) - (4)])); } @@ -2985,7 +2988,7 @@ yyreduce: case 102: /* Line 1792 of yacc.c */ -#line 505 "src/IceGrid/Grammar.y" +#line 508 "src/IceGrid/Grammar.y" { parser->usage("adapter", "remove"); } @@ -2993,7 +2996,7 @@ yyreduce: case 103: /* Line 1792 of yacc.c */ -#line 509 "src/IceGrid/Grammar.y" +#line 512 "src/IceGrid/Grammar.y" { parser->listAllAdapters((yyvsp[(3) - (4)])); } @@ -3001,7 +3004,7 @@ yyreduce: case 104: /* Line 1792 of yacc.c */ -#line 513 "src/IceGrid/Grammar.y" +#line 516 "src/IceGrid/Grammar.y" { parser->usage("adapter", "list"); } @@ -3009,7 +3012,7 @@ yyreduce: case 105: /* Line 1792 of yacc.c */ -#line 517 "src/IceGrid/Grammar.y" +#line 520 "src/IceGrid/Grammar.y" { parser->addObject((yyvsp[(3) - (4)])); } @@ -3017,7 +3020,7 @@ yyreduce: case 106: /* Line 1792 of yacc.c */ -#line 521 "src/IceGrid/Grammar.y" +#line 524 "src/IceGrid/Grammar.y" { parser->usage("object", "add"); } @@ -3025,7 +3028,7 @@ yyreduce: case 107: /* Line 1792 of yacc.c */ -#line 525 "src/IceGrid/Grammar.y" +#line 528 "src/IceGrid/Grammar.y" { parser->removeObject((yyvsp[(3) - (4)])); } @@ -3033,7 +3036,7 @@ yyreduce: case 108: /* Line 1792 of yacc.c */ -#line 529 "src/IceGrid/Grammar.y" +#line 532 "src/IceGrid/Grammar.y" { parser->usage("object", "remove"); } @@ -3041,7 +3044,7 @@ yyreduce: case 109: /* Line 1792 of yacc.c */ -#line 533 "src/IceGrid/Grammar.y" +#line 536 "src/IceGrid/Grammar.y" { parser->findObject((yyvsp[(3) - (4)])); } @@ -3049,7 +3052,7 @@ yyreduce: case 110: /* Line 1792 of yacc.c */ -#line 537 "src/IceGrid/Grammar.y" +#line 540 "src/IceGrid/Grammar.y" { parser->usage("object", "find"); } @@ -3057,7 +3060,7 @@ yyreduce: case 111: /* Line 1792 of yacc.c */ -#line 541 "src/IceGrid/Grammar.y" +#line 544 "src/IceGrid/Grammar.y" { parser->listObject((yyvsp[(3) - (4)])); } @@ -3065,7 +3068,7 @@ yyreduce: case 112: /* Line 1792 of yacc.c */ -#line 545 "src/IceGrid/Grammar.y" +#line 548 "src/IceGrid/Grammar.y" { parser->usage("object", "list"); } @@ -3073,7 +3076,7 @@ yyreduce: case 113: /* Line 1792 of yacc.c */ -#line 549 "src/IceGrid/Grammar.y" +#line 552 "src/IceGrid/Grammar.y" { parser->describeObject((yyvsp[(3) - (4)])); } @@ -3081,7 +3084,7 @@ yyreduce: case 114: /* Line 1792 of yacc.c */ -#line 553 "src/IceGrid/Grammar.y" +#line 556 "src/IceGrid/Grammar.y" { parser->usage("object", "describe"); } @@ -3089,7 +3092,7 @@ yyreduce: case 115: /* Line 1792 of yacc.c */ -#line 557 "src/IceGrid/Grammar.y" +#line 560 "src/IceGrid/Grammar.y" { parser->showCopying(); } @@ -3097,7 +3100,7 @@ yyreduce: case 116: /* Line 1792 of yacc.c */ -#line 561 "src/IceGrid/Grammar.y" +#line 564 "src/IceGrid/Grammar.y" { parser->showWarranty(); } @@ -3105,7 +3108,7 @@ yyreduce: case 117: /* Line 1792 of yacc.c */ -#line 565 "src/IceGrid/Grammar.y" +#line 568 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(2) - (3)]).front()); } @@ -3113,7 +3116,7 @@ yyreduce: case 118: /* Line 1792 of yacc.c */ -#line 569 "src/IceGrid/Grammar.y" +#line 572 "src/IceGrid/Grammar.y" { if(((yyvsp[(2) - (4)]).front() == "server" || (yyvsp[(2) - (4)]).front() == "service") && (yyvsp[(3) - (4)]).front() == "template") { @@ -3128,7 +3131,7 @@ yyreduce: case 119: /* Line 1792 of yacc.c */ -#line 580 "src/IceGrid/Grammar.y" +#line 583 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(2) - (5)]).front(), (yyvsp[(3) - (5)]).front()); } @@ -3136,7 +3139,7 @@ yyreduce: case 120: /* Line 1792 of yacc.c */ -#line 584 "src/IceGrid/Grammar.y" +#line 587 "src/IceGrid/Grammar.y" { if(((yyvsp[(2) - (5)]).front() == "server" || (yyvsp[(2) - (5)]).front() == "service") && (yyvsp[(3) - (5)]).front() == "template") { @@ -3151,7 +3154,7 @@ yyreduce: case 121: /* Line 1792 of yacc.c */ -#line 595 "src/IceGrid/Grammar.y" +#line 598 "src/IceGrid/Grammar.y" { if(((yyvsp[(2) - (6)]).front() == "server" || (yyvsp[(2) - (6)]).front() == "service") && (yyvsp[(3) - (6)]).front() == "template") { @@ -3166,7 +3169,7 @@ yyreduce: case 122: /* Line 1792 of yacc.c */ -#line 606 "src/IceGrid/Grammar.y" +#line 609 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(2) - (4)]).front()); } @@ -3174,7 +3177,7 @@ yyreduce: case 123: /* Line 1792 of yacc.c */ -#line 610 "src/IceGrid/Grammar.y" +#line 613 "src/IceGrid/Grammar.y" { parser->usage(); } @@ -3182,7 +3185,7 @@ yyreduce: case 124: /* Line 1792 of yacc.c */ -#line 614 "src/IceGrid/Grammar.y" +#line 617 "src/IceGrid/Grammar.y" { parser->usage((yyvsp[(1) - (3)]).front()); } @@ -3190,7 +3193,7 @@ yyreduce: case 125: /* Line 1792 of yacc.c */ -#line 618 "src/IceGrid/Grammar.y" +#line 621 "src/IceGrid/Grammar.y" { (yyvsp[(1) - (4)]).push_back((yyvsp[(2) - (4)]).front()); parser->invalidCommand((yyvsp[(1) - (4)])); @@ -3200,7 +3203,7 @@ yyreduce: case 126: /* Line 1792 of yacc.c */ -#line 624 "src/IceGrid/Grammar.y" +#line 627 "src/IceGrid/Grammar.y" { parser->invalidCommand((yyvsp[(1) - (3)])); yyerrok; @@ -3209,7 +3212,7 @@ yyreduce: case 127: /* Line 1792 of yacc.c */ -#line 629 "src/IceGrid/Grammar.y" +#line 632 "src/IceGrid/Grammar.y" { parser->invalidCommand((yyvsp[(1) - (3)])); yyerrok; @@ -3218,7 +3221,7 @@ yyreduce: case 128: /* Line 1792 of yacc.c */ -#line 634 "src/IceGrid/Grammar.y" +#line 637 "src/IceGrid/Grammar.y" { yyerrok; } @@ -3226,14 +3229,14 @@ yyreduce: case 129: /* Line 1792 of yacc.c */ -#line 638 "src/IceGrid/Grammar.y" +#line 641 "src/IceGrid/Grammar.y" { } break; case 130: /* Line 1792 of yacc.c */ -#line 647 "src/IceGrid/Grammar.y" +#line 649 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -3242,7 +3245,7 @@ yyreduce: case 131: /* Line 1792 of yacc.c */ -#line 652 "src/IceGrid/Grammar.y" +#line 654 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -3251,7 +3254,7 @@ yyreduce: case 132: /* Line 1792 of yacc.c */ -#line 657 "src/IceGrid/Grammar.y" +#line 659 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); (yyval).push_front("help"); @@ -3261,7 +3264,7 @@ yyreduce: case 133: /* Line 1792 of yacc.c */ -#line 663 "src/IceGrid/Grammar.y" +#line 665 "src/IceGrid/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); (yyval).push_front("help"); @@ -3271,7 +3274,7 @@ yyreduce: case 134: /* Line 1792 of yacc.c */ -#line 669 "src/IceGrid/Grammar.y" +#line 671 "src/IceGrid/Grammar.y" { (yyval) = YYSTYPE(); } @@ -3279,273 +3282,273 @@ yyreduce: case 135: /* Line 1792 of yacc.c */ -#line 678 "src/IceGrid/Grammar.y" +#line 680 "src/IceGrid/Grammar.y" { } break; case 136: /* Line 1792 of yacc.c */ -#line 681 "src/IceGrid/Grammar.y" +#line 683 "src/IceGrid/Grammar.y" { } break; case 137: /* Line 1792 of yacc.c */ -#line 684 "src/IceGrid/Grammar.y" +#line 686 "src/IceGrid/Grammar.y" { } break; case 138: /* Line 1792 of yacc.c */ -#line 687 "src/IceGrid/Grammar.y" +#line 689 "src/IceGrid/Grammar.y" { } break; case 139: /* Line 1792 of yacc.c */ -#line 690 "src/IceGrid/Grammar.y" +#line 692 "src/IceGrid/Grammar.y" { } break; case 140: /* Line 1792 of yacc.c */ -#line 693 "src/IceGrid/Grammar.y" +#line 695 "src/IceGrid/Grammar.y" { } break; case 141: /* Line 1792 of yacc.c */ -#line 696 "src/IceGrid/Grammar.y" +#line 698 "src/IceGrid/Grammar.y" { } break; case 142: /* Line 1792 of yacc.c */ -#line 699 "src/IceGrid/Grammar.y" +#line 701 "src/IceGrid/Grammar.y" { } break; case 143: /* Line 1792 of yacc.c */ -#line 702 "src/IceGrid/Grammar.y" +#line 704 "src/IceGrid/Grammar.y" { } break; case 144: /* Line 1792 of yacc.c */ -#line 705 "src/IceGrid/Grammar.y" +#line 707 "src/IceGrid/Grammar.y" { } break; case 145: /* Line 1792 of yacc.c */ -#line 708 "src/IceGrid/Grammar.y" +#line 710 "src/IceGrid/Grammar.y" { } break; case 146: /* Line 1792 of yacc.c */ -#line 711 "src/IceGrid/Grammar.y" +#line 713 "src/IceGrid/Grammar.y" { } break; case 147: /* Line 1792 of yacc.c */ -#line 714 "src/IceGrid/Grammar.y" +#line 716 "src/IceGrid/Grammar.y" { } break; case 148: /* Line 1792 of yacc.c */ -#line 717 "src/IceGrid/Grammar.y" +#line 719 "src/IceGrid/Grammar.y" { } break; case 149: /* Line 1792 of yacc.c */ -#line 720 "src/IceGrid/Grammar.y" +#line 722 "src/IceGrid/Grammar.y" { } break; case 150: /* Line 1792 of yacc.c */ -#line 723 "src/IceGrid/Grammar.y" +#line 725 "src/IceGrid/Grammar.y" { } break; case 151: /* Line 1792 of yacc.c */ -#line 726 "src/IceGrid/Grammar.y" +#line 728 "src/IceGrid/Grammar.y" { } break; case 152: /* Line 1792 of yacc.c */ -#line 729 "src/IceGrid/Grammar.y" +#line 731 "src/IceGrid/Grammar.y" { } break; case 153: /* Line 1792 of yacc.c */ -#line 732 "src/IceGrid/Grammar.y" +#line 734 "src/IceGrid/Grammar.y" { } break; case 154: /* Line 1792 of yacc.c */ -#line 735 "src/IceGrid/Grammar.y" +#line 737 "src/IceGrid/Grammar.y" { } break; case 155: /* Line 1792 of yacc.c */ -#line 738 "src/IceGrid/Grammar.y" +#line 740 "src/IceGrid/Grammar.y" { } break; case 156: /* Line 1792 of yacc.c */ -#line 741 "src/IceGrid/Grammar.y" +#line 743 "src/IceGrid/Grammar.y" { } break; case 157: /* Line 1792 of yacc.c */ -#line 744 "src/IceGrid/Grammar.y" +#line 746 "src/IceGrid/Grammar.y" { } break; case 158: /* Line 1792 of yacc.c */ -#line 747 "src/IceGrid/Grammar.y" +#line 749 "src/IceGrid/Grammar.y" { } break; case 159: /* Line 1792 of yacc.c */ -#line 750 "src/IceGrid/Grammar.y" +#line 752 "src/IceGrid/Grammar.y" { } break; case 160: /* Line 1792 of yacc.c */ -#line 753 "src/IceGrid/Grammar.y" +#line 755 "src/IceGrid/Grammar.y" { } break; case 161: /* Line 1792 of yacc.c */ -#line 756 "src/IceGrid/Grammar.y" +#line 758 "src/IceGrid/Grammar.y" { } break; case 162: /* Line 1792 of yacc.c */ -#line 759 "src/IceGrid/Grammar.y" +#line 761 "src/IceGrid/Grammar.y" { } break; case 163: /* Line 1792 of yacc.c */ -#line 762 "src/IceGrid/Grammar.y" +#line 764 "src/IceGrid/Grammar.y" { } break; case 164: /* Line 1792 of yacc.c */ -#line 765 "src/IceGrid/Grammar.y" +#line 767 "src/IceGrid/Grammar.y" { } break; case 165: /* Line 1792 of yacc.c */ -#line 768 "src/IceGrid/Grammar.y" +#line 770 "src/IceGrid/Grammar.y" { } break; case 166: /* Line 1792 of yacc.c */ -#line 771 "src/IceGrid/Grammar.y" +#line 773 "src/IceGrid/Grammar.y" { } break; case 167: /* Line 1792 of yacc.c */ -#line 774 "src/IceGrid/Grammar.y" +#line 776 "src/IceGrid/Grammar.y" { } break; case 168: /* Line 1792 of yacc.c */ -#line 777 "src/IceGrid/Grammar.y" +#line 779 "src/IceGrid/Grammar.y" { } break; case 169: /* Line 1792 of yacc.c */ -#line 780 "src/IceGrid/Grammar.y" +#line 782 "src/IceGrid/Grammar.y" { } break; case 170: /* Line 1792 of yacc.c */ -#line 783 "src/IceGrid/Grammar.y" +#line 785 "src/IceGrid/Grammar.y" { } break; case 171: /* Line 1792 of yacc.c */ -#line 786 "src/IceGrid/Grammar.y" +#line 788 "src/IceGrid/Grammar.y" { } break; case 172: /* Line 1792 of yacc.c */ -#line 789 "src/IceGrid/Grammar.y" +#line 791 "src/IceGrid/Grammar.y" { } break; /* Line 1792 of yacc.c */ -#line 3549 "src/IceGrid/Grammar.cpp" +#line 3552 "src/IceGrid/Grammar.cpp" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/cpp/src/IceGrid/Grammar.h b/cpp/src/IceGrid/Grammar.h index e960e2580ae..9a3871b803c 100644 --- a/cpp/src/IceGrid/Grammar.h +++ b/cpp/src/IceGrid/Grammar.h @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7. */ /* Bison interface for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ diff --git a/cpp/src/IceGrid/Grammar.y b/cpp/src/IceGrid/Grammar.y index d407d6e1d9c..f04c704ac1a 100644 --- a/cpp/src/IceGrid/Grammar.y +++ b/cpp/src/IceGrid/Grammar.y @@ -13,11 +13,14 @@ #include <IceGrid/Parser.h> #ifdef _MSC_VER -// I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label -# pragma warning( disable : 4102 ) +# pragma warning(disable:4102) // warning C4065: switch statement contains 'default' but no 'case' labels -# pragma warning( disable : 4065 ) +# pragma warning(disable:4065) +// warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data +# pragma warning(disable:4244) +// warning C4702: unreachable code +# pragma warning(disable:4702) #endif // diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp index 9dbfbf71aff..2e080ef1265 100644 --- a/cpp/src/IceGrid/LocatorI.cpp +++ b/cpp/src/IceGrid/LocatorI.cpp @@ -639,8 +639,8 @@ private: LocatorAdapterInfo nextAdapter() { - bool replicaGroup; - bool roundRobin; + bool replicaGroup = false; + bool roundRobin = false; _adapters.clear(); diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp index e2fc8bc28fb..488fda81102 100644 --- a/cpp/src/IceGrid/PlatformInfo.cpp +++ b/cpp/src/IceGrid/PlatformInfo.cpp @@ -240,8 +240,8 @@ PlatformInfo::PlatformInfo(const string& prefix, #ifdef _WIN32 _os = "Windows"; char hostname[MAX_COMPUTERNAME_LENGTH + 1]; - unsigned long size = sizeof(hostname); - if(GetComputerName(hostname, &size)) + unsigned long hsize = sizeof(hostname); + if(GetComputerName(hostname, &hsize)) { _hostname = hostname; } @@ -627,7 +627,7 @@ PlatformInfo::runUpdateLoadInfo() } int usage = 100; - PDH_STATUS err = PdhCollectQueryData(query); + err = PdhCollectQueryData(query); if(err == ERROR_SUCCESS) { DWORD type; diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp index 792c8c8345f..aa2db617766 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.cpp +++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp @@ -35,7 +35,7 @@ public: virtual void applicationInit(int, const ApplicationInfoSeq& applications, const Ice::Current& current) { - int serial; + int serial = 0; _database->syncApplications(applications, getSerials(current.ctx, serial)); receivedUpdate(ApplicationObserverTopicName, serial); } @@ -43,7 +43,7 @@ public: virtual void applicationAdded(int, const ApplicationInfo& application, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -61,7 +61,7 @@ public: virtual void applicationRemoved(int, const std::string& name, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -79,7 +79,7 @@ public: virtual void applicationUpdated(int, const ApplicationUpdateInfo& update, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -103,7 +103,7 @@ public: virtual void adapterInit(const AdapterInfoSeq& adapters, const Ice::Current& current) { - int serial; + int serial = 0; _database->syncAdapters(adapters, getSerials(current.ctx, serial)); receivedUpdate(AdapterObserverTopicName, serial); } @@ -111,7 +111,7 @@ public: virtual void adapterAdded(const AdapterInfo& info, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -127,7 +127,7 @@ public: virtual void adapterUpdated(const AdapterInfo& info, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -143,7 +143,7 @@ public: virtual void adapterRemoved(const std::string& id, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -159,7 +159,7 @@ public: virtual void objectInit(const ObjectInfoSeq& objects, const Ice::Current& current) { - int serial; + int serial = 0; _database->syncObjects(objects, getSerials(current.ctx, serial)); receivedUpdate(ObjectObserverTopicName, serial); } @@ -167,7 +167,7 @@ public: virtual void objectAdded(const ObjectInfo& info, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -186,7 +186,7 @@ public: virtual void objectUpdated(const ObjectInfo& info, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { @@ -211,7 +211,7 @@ public: virtual void objectRemoved(const Ice::Identity& id, const Ice::Current& current) { - int serial; + int serial = 0; string failure; try { diff --git a/cpp/src/IceGrid/Scanner.cpp b/cpp/src/IceGrid/Scanner.cpp index d60c110ab6e..bfc2338021f 100644 --- a/cpp/src/IceGrid/Scanner.cpp +++ b/cpp/src/IceGrid/Scanner.cpp @@ -35,7 +35,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -52,7 +52,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -169,7 +169,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -226,7 +226,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -475,24 +475,19 @@ char *yytext; #include <IceGrid/Parser.h> #include <IceGrid/Grammar.h> -#if defined(_MSC_VER) && defined(ICE_64) -// -// '=' : conversion from 'size_t' to 'int', possible loss of data -// The result of fread() is a size_t and gets inserted into an int -// -# pragma warning( 4 : 4267 ) -// +#if defined(_MSC_VER) +// '<' : signed/unsigned mismatch +# pragma warning(disable:4018) // 'initializing' : conversion from '__int64' to 'int', possible loss of data -// Puts a pointer-difference into an int -// -# pragma warning( 4 : 4244 ) -#endif +# pragma warning(disable:4244) -#if defined(_MSC_VER) && defined(ICE_32) +# if defined(ICE_64) // -// '<' : signed/unsigned mismatch +// '=' : conversion from 'size_t' to 'int', possible loss of data +// The result of fread() is a size_t and gets inserted into an int // -# pragma warning( 4 : 4018 ) +# pragma warning(disable:4267) +# endif #endif #if defined(__GNUC__) @@ -536,7 +531,7 @@ std::string parseSingleQuotedString(); } #define YY_USER_INIT initScanner(); -#line 539 "src/IceGrid/Scanner.cpp" +#line 534 "src/IceGrid/Scanner.cpp" #define INITIAL 0 @@ -596,7 +591,7 @@ extern int yywrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -717,11 +712,11 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; + +#line 81 "src/IceGrid/Scanner.l" -#line 86 "src/IceGrid/Scanner.l" - -#line 724 "src/IceGrid/Scanner.cpp" +#line 719 "src/IceGrid/Scanner.cpp" if ( !(yy_init) ) { @@ -806,7 +801,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 88 "src/IceGrid/Scanner.l" +#line 83 "src/IceGrid/Scanner.l" { // C++-style comment int c; @@ -819,7 +814,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 98 "src/IceGrid/Scanner.l" +#line 93 "src/IceGrid/Scanner.l" { // C-style comment while(true) @@ -848,7 +843,7 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 123 "src/IceGrid/Scanner.l" +#line 118 "src/IceGrid/Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -863,14 +858,14 @@ YY_RULE_SETUP case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 134 "src/IceGrid/Scanner.l" +#line 129 "src/IceGrid/Scanner.l" { return ';'; } YY_BREAK case 5: YY_RULE_SETUP -#line 138 "src/IceGrid/Scanner.l" +#line 133 "src/IceGrid/Scanner.l" { // "..."-type strings string s = parseDoubleQuotedString(); @@ -881,7 +876,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 146 "src/IceGrid/Scanner.l" +#line 141 "src/IceGrid/Scanner.l" { // '...'-type strings string s; @@ -909,7 +904,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 171 "src/IceGrid/Scanner.l" +#line 166 "src/IceGrid/Scanner.l" { // Simple strings string s; @@ -948,10 +943,10 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 207 "src/IceGrid/Scanner.l" +#line 202 "src/IceGrid/Scanner.l" ECHO; YY_BREAK -#line 954 "src/IceGrid/Scanner.cpp" +#line 949 "src/IceGrid/Scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1229,7 +1224,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) @@ -1283,7 +1278,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ @@ -1326,7 +1321,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1393,12 +1388,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1411,11 +1406,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); @@ -1455,13 +1450,13 @@ static void yy_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1484,11 +1479,11 @@ static void yy_load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1509,7 +1504,7 @@ static void yy_load_buffer_state (void) { int oerrno = errno; - + yy_flush_buffer(b ); b->yy_input_file = file; @@ -1531,7 +1526,7 @@ static void yy_load_buffer_state (void) /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { @@ -1560,7 +1555,7 @@ static void yy_load_buffer_state (void) * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -1590,7 +1585,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void yypop_buffer_state (void) { @@ -1614,7 +1609,7 @@ void yypop_buffer_state (void) static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -1627,9 +1622,9 @@ static void yyensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -1657,13 +1652,13 @@ static void yyensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1692,14 +1687,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - + return yy_scan_bytes(yystr,strlen(yystr) ); } @@ -1707,7 +1702,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) @@ -1716,7 +1711,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); @@ -1770,16 +1765,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyget_lineno (void) { - + return yylineno; } /** Get the input stream. - * + * */ FILE *yyget_in (void) { @@ -1787,7 +1782,7 @@ FILE *yyget_in (void) } /** Get the output stream. - * + * */ FILE *yyget_out (void) { @@ -1795,7 +1790,7 @@ FILE *yyget_out (void) } /** Get the length of the current token. - * + * */ yy_size_t yyget_leng (void) { @@ -1803,7 +1798,7 @@ yy_size_t yyget_leng (void) } /** Get the current token. - * + * */ char *yyget_text (void) @@ -1813,18 +1808,18 @@ char *yyget_text (void) /** Set the current line number. * @param line_number - * + * */ void yyset_lineno (int line_number ) { - + yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) @@ -1878,7 +1873,7 @@ static int yy_init_globals (void) /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); @@ -1945,7 +1940,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 207 "src/IceGrid/Scanner.l" +#line 202 "src/IceGrid/Scanner.l" diff --git a/cpp/src/IceGrid/Scanner.l b/cpp/src/IceGrid/Scanner.l index 2b6d0a87082..f77e24bc0f5 100644 --- a/cpp/src/IceGrid/Scanner.l +++ b/cpp/src/IceGrid/Scanner.l @@ -13,24 +13,19 @@ #include <IceGrid/Parser.h> #include <IceGrid/Grammar.h> -#if defined(_MSC_VER) && defined(ICE_64) -// -// '=' : conversion from 'size_t' to 'int', possible loss of data -// The result of fread() is a size_t and gets inserted into an int -// -# pragma warning( 4 : 4267 ) -// +#if defined(_MSC_VER) +// '<' : signed/unsigned mismatch +# pragma warning(disable:4018) // 'initializing' : conversion from '__int64' to 'int', possible loss of data -// Puts a pointer-difference into an int -// -# pragma warning( 4 : 4244 ) -#endif +# pragma warning(disable:4244) -#if defined(_MSC_VER) && defined(ICE_32) +# if defined(ICE_64) // -// '<' : signed/unsigned mismatch +// '=' : conversion from 'size_t' to 'int', possible loss of data +// The result of fread() is a size_t and gets inserted into an int // -# pragma warning( 4 : 4018 ) +# pragma warning(disable:4267) +# endif #endif #if defined(__GNUC__) diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index fdceb9c6748..289cf80b295 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -118,7 +118,6 @@ CheckUpdateResult::getResult() os << ex; throw NodeUnreachableException(_node, os.str()); } - return false; } ServerCache::ServerCache(const Ice::CommunicatorPtr& communicator, diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 22e6cdf1c95..2a249101a62 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -2479,9 +2479,9 @@ ServerI::checkRevision(const string& replicaName, const string& uuid, int revisi is.getline(line, 1024); // Ignore comments is.getline(line, 1024); is.getline(line, 1024); - string ignore; - is >> ignore >> descUUID; - is >> ignore >> descRevision; + string ignored; + is >> ignored >> descUUID; + is >> ignored >> descRevision; } if(uuid != descUUID) @@ -3175,7 +3175,6 @@ ServerI::getFilePath(const string& filename) const else { throw FileNotAvailableException("unknown file"); - return ""; // Keep the compiler happy. } } diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index db12a8ec63f..b3c1bd88dc5 100644 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -826,7 +826,7 @@ getFileInfoSeqInternal(const string& basePath, const string& relPath, int compre } else { - fill(bytesSHA.begin(), bytesSHA.end(), 0); + fill(bytesSHA.begin(), bytesSHA.end(), Byte(0)); } info.checksum.swap(bytesSHA); @@ -887,7 +887,7 @@ getFileInfoSeqInternal(const string& basePath, const string& relPath, int compre if(relPath.size() + buf.st_size == 0) { bytesSHA.resize(20); - fill(bytesSHA.begin(), bytesSHA.end(), 0); + fill(bytesSHA.begin(), bytesSHA.end(), Byte(0)); } else { @@ -1226,7 +1226,7 @@ IcePatch2Internal::getFileTree0(const LargeFileInfoSeq& infoSeq, FileTree0& tree } else { - fill(tree1.checksum.begin(), tree1.checksum.end(), 0); + fill(tree1.checksum.begin(), tree1.checksum.end(), Byte(0)); } copy(tree1.checksum.begin(), tree1.checksum.end(), c0); @@ -1238,6 +1238,6 @@ IcePatch2Internal::getFileTree0(const LargeFileInfoSeq& infoSeq, FileTree0& tree } else { - fill(tree0.checksum.begin(), tree0.checksum.end(), 0); + fill(tree0.checksum.begin(), tree0.checksum.end(), Byte(0)); } } diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp index 9cf0b277242..518d8c5fca3 100644 --- a/cpp/src/IceSSL/OpenSSLEngine.cpp +++ b/cpp/src/IceSSL/OpenSSLEngine.cpp @@ -31,6 +31,10 @@ #include <openssl/ssl.h> #include <openssl/pkcs12.h> +#ifdef _MSC_VER +# pragma warning(disable:4127) // conditional expression is constant +#endif + using namespace std; using namespace Ice; using namespace IceSSL; @@ -496,7 +500,7 @@ OpenSSL::SSLEngine::initialize() while(count < passwordRetryMax) { ERR_clear_error(); - if((success = SSL_CTX_load_verify_locations(_ctx, file, dir)) || !passwordError()) + if((success = SSL_CTX_load_verify_locations(_ctx, file, dir)) != 0 || !passwordError()) { break; } @@ -584,7 +588,7 @@ OpenSSL::SSLEngine::initialize() key = 0; cert = 0; chain = 0; - if(!(success = PKCS12_parse(p12, password(false).c_str(), &key, &cert, &chain))) + if((success = PKCS12_parse(p12, password(false).c_str(), &key, &cert, &chain)) == 0) { if(passwordError()) { @@ -666,7 +670,7 @@ OpenSSL::SSLEngine::initialize() while(count < passwordRetryMax) { ERR_clear_error(); - if(!(success = SSL_CTX_use_certificate_chain_file(_ctx, file.c_str()))) + if((success = SSL_CTX_use_certificate_chain_file(_ctx, file.c_str())) == 0) { if(passwordError()) { diff --git a/cpp/src/IceSSL/RFC2253.cpp b/cpp/src/IceSSL/RFC2253.cpp index 5111d5d6716..04440590da8 100644 --- a/cpp/src/IceSSL/RFC2253.cpp +++ b/cpp/src/IceSSL/RFC2253.cpp @@ -187,7 +187,6 @@ hexToInt(char v) return 10 + (v - 'A'); } throw ParseException(__FILE__, __LINE__, "unescape: invalid hex pair"); - return 0; // To satisfy the compiler. } static char diff --git a/cpp/src/IceSSL/SChannelCertificateI.cpp b/cpp/src/IceSSL/SChannelCertificateI.cpp index 5fd0c632b35..cad4b80ec5d 100644 --- a/cpp/src/IceSSL/SChannelCertificateI.cpp +++ b/cpp/src/IceSSL/SChannelCertificateI.cpp @@ -165,17 +165,17 @@ filetimeToTime(FILETIME ftime) } string -certNameToString(CERT_NAME_BLOB* name) +certNameToString(CERT_NAME_BLOB* certName) { - assert(name); + assert(certName); DWORD length = 0; - if(!(length = CertNameToStr(X509_ASN_ENCODING, name, CERT_OID_NAME_STR|CERT_NAME_STR_REVERSE_FLAG, 0, 0))) + if((length = CertNameToStr(X509_ASN_ENCODING, certName, CERT_OID_NAME_STR|CERT_NAME_STR_REVERSE_FLAG, 0, 0)) == 0) { throw CertificateEncodingException(__FILE__, __LINE__, IceUtilInternal::lastErrorToString()); } vector<char> buffer(length); - if(!CertNameToStr(X509_ASN_ENCODING, name, CERT_OID_NAME_STR|CERT_NAME_STR_REVERSE_FLAG, &buffer[0], length)) + if(!CertNameToStr(X509_ASN_ENCODING, certName, CERT_OID_NAME_STR|CERT_NAME_STR_REVERSE_FLAG, &buffer[0], length)) { throw CertificateEncodingException(__FILE__, __LINE__, IceUtilInternal::lastErrorToString()); } diff --git a/cpp/src/IceSSL/SChannelEngine.cpp b/cpp/src/IceSSL/SChannelEngine.cpp index 51ddfd1856b..b6b4bdff760 100644 --- a/cpp/src/IceSSL/SChannelEngine.cpp +++ b/cpp/src/IceSSL/SChannelEngine.cpp @@ -82,7 +82,7 @@ addMatchingCertificates(HCERTSTORE source, HCERTSTORE target, DWORD findType, co do { if((next = CertFindCertificateInStore(source, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, - findType, findParam, next))) + findType, findParam, next)) != 0) { if(!CertAddCertificateContextToStore(target, next, CERT_STORE_ADD_ALWAYS, 0)) { @@ -95,7 +95,7 @@ addMatchingCertificates(HCERTSTORE source, HCERTSTORE target, DWORD findType, co } vector<PCCERT_CONTEXT> -findCertificates(const string& location, const string& name, const string& value, vector<HCERTSTORE>& stores) +findCertificates(const string& location, const string& storeName, const string& value, vector<HCERTSTORE>& stores) { DWORD storeLoc; if(location == "CurrentUser") @@ -107,10 +107,10 @@ findCertificates(const string& location, const string& name, const string& value storeLoc = CERT_SYSTEM_STORE_LOCAL_MACHINE; } - HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, storeLoc, Ice::stringToWstring(name).c_str()); + HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, storeLoc, Ice::stringToWstring(storeName).c_str()); if(!store) { - throw PluginInitializationException(__FILE__, __LINE__, "IceSSL: failed to open certificate store `" + name + + throw PluginInitializationException(__FILE__, __LINE__, "IceSSL: failed to open certificate store `" + storeName + "':\n" + IceUtilInternal::lastErrorToString()); } @@ -274,7 +274,7 @@ findCertificates(const string& location, const string& name, const string& value do { if((next = CertFindCertificateInStore(store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, - CERT_FIND_ANY, 0, next))) + CERT_FIND_ANY, 0, next)) != 0) { if(CertCompareIntegerBlob(&serial, &next->pCertInfo->SerialNumber)) { @@ -316,7 +316,7 @@ findCertificates(const string& location, const string& name, const string& value do { if((next = CertFindCertificateInStore(store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, CERT_FIND_ANY, 0, - next))) + next)) != 0) { certs.push_back(next); } @@ -783,21 +783,21 @@ SChannel::SSLEngine::initialize() for(size_t i = 0; i < certFiles.size(); ++i) { - string certFile = certFiles[i]; + string cFile = certFiles[i]; string resolved; - if(!checkPath(certFile, defaultDir, false, resolved)) + if(!checkPath(cFile, defaultDir, false, resolved)) { throw PluginInitializationException(__FILE__, __LINE__, - "IceSSL: certificate file not found:\n" + certFile); + "IceSSL: certificate file not found:\n" + cFile); } - certFile = resolved; + cFile = resolved; vector<char> buffer; - readFile(certFile, buffer); + readFile(cFile, buffer); if(buffer.empty()) { throw PluginInitializationException(__FILE__, __LINE__, - "IceSSL: certificate file is empty:\n" + certFile); + "IceSSL: certificate file is empty:\n" + cFile); } CRYPT_DATA_BLOB pfxBlob; @@ -994,7 +994,7 @@ SChannel::SSLEngine::initialize() "store:\n" + lastErrorToString()); } - addCertificatesToStore(certFile, store, &cert); + addCertificatesToStore(cFile, store, &cert); // // Associate key & certificate diff --git a/cpp/src/IceSSL/SChannelTransceiverI.cpp b/cpp/src/IceSSL/SChannelTransceiverI.cpp index 59a5c540f09..94caf0ff093 100644 --- a/cpp/src/IceSSL/SChannelTransceiverI.cpp +++ b/cpp/src/IceSSL/SChannelTransceiverI.cpp @@ -900,7 +900,7 @@ SChannel::TransceiverI::startWrite(IceInternal::Buffer& buffer) _bufferedW = encryptMessage(buffer); } - return _delegate->startWrite(_writeBuffer) && _bufferedW == (buffer.b.end() - buffer.i); + return _delegate->startWrite(_writeBuffer) && _bufferedW == static_cast<size_t>((buffer.b.end() - buffer.i)); } void diff --git a/cpp/src/IceSSL/UWPCertificateI.cpp b/cpp/src/IceSSL/UWPCertificateI.cpp index 663deb4cb7a..98e090976e8 100644 --- a/cpp/src/IceSSL/UWPCertificateI.cpp +++ b/cpp/src/IceSSL/UWPCertificateI.cpp @@ -224,11 +224,11 @@ UWP::Certificate::create(Windows::Security::Cryptography::Certificates::Certific } UWP::CertificatePtr -UWP::Certificate::load(const std::string& file) +UWP::Certificate::load(const std::string& filename) { try { - auto uri = ref new Uri(ref new String(stringToWstring(file).c_str())); + auto uri = ref new Uri(ref new String(stringToWstring(filename).c_str())); auto file = create_task(StorageFile::GetFileFromApplicationUriAsync(uri)).get(); auto buffer = create_task(FileIO::ReadTextAsync(file)).get(); return UWP::Certificate::decode(wstringToString(buffer->Data())); @@ -237,7 +237,7 @@ UWP::Certificate::load(const std::string& file) { if(HRESULT_CODE(ex->HResult) == ERROR_FILE_NOT_FOUND) { - throw CertificateReadException(__FILE__, __LINE__, "error opening file :" + file); + throw CertificateReadException(__FILE__, __LINE__, "error opening file :" + filename); } else { diff --git a/cpp/src/IceSSL/UWPEngine.cpp b/cpp/src/IceSSL/UWPEngine.cpp index 3b416b5f012..74069d0fe31 100644 --- a/cpp/src/IceSSL/UWPEngine.cpp +++ b/cpp/src/IceSSL/UWPEngine.cpp @@ -104,10 +104,10 @@ importPfxData(String^ friendlyName, String^ data, String^ password) } Certificates::Certificate^ -importPersonalCertificate(const string& file, function<string ()> password, bool passwordPrompt, +importPersonalCertificate(const string& filename, function<string ()> password, bool passwordPrompt, int passwordRetryMax) { - auto uri = ref new Uri(ref new String(stringToWstring(file).c_str())); + auto uri = ref new Uri(ref new String(stringToWstring(filename).c_str())); try { auto file = IceInternal::runSync(StorageFile::GetFileFromApplicationUriAsync(uri)); @@ -153,7 +153,7 @@ importPersonalCertificate(const string& file, function<string ()> password, bool { if(HRESULT_CODE(ex->HResult) == ERROR_FILE_NOT_FOUND) { - throw PluginInitializationException(__FILE__, __LINE__, "certificate file not found:\n" + file); + throw PluginInitializationException(__FILE__, __LINE__, "certificate file not found:\n" + filename); } else { diff --git a/cpp/src/IceStorm/Grammar.cpp b/cpp/src/IceStorm/Grammar.cpp index 62f47bd4a95..44d4bd246c6 100644 --- a/cpp/src/IceStorm/Grammar.cpp +++ b/cpp/src/IceStorm/Grammar.cpp @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -79,11 +79,14 @@ #include <IceStorm/Parser.h> #ifdef _MSC_VER -// I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label -# pragma warning( disable : 4102 ) +# pragma warning(disable:4102) // warning C4065: switch statement contains 'default' but no 'case' labels -# pragma warning( disable : 4065 ) +# pragma warning(disable:4065) +// warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data +# pragma warning(disable:4244) +// warning C4702: unreachable code +# pragma warning(disable:4702) #endif // @@ -105,7 +108,7 @@ yyerror(const char* s) /* Line 371 of yacc.c */ -#line 109 "src/IceStorm/Grammar.cpp" +#line 112 "src/IceStorm/Grammar.cpp" # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -184,7 +187,7 @@ int yyparse (); /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ -#line 188 "src/IceStorm/Grammar.cpp" +#line 191 "src/IceStorm/Grammar.cpp" #ifdef short # undef short @@ -482,10 +485,10 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 67, 67, 71, 78, 81, 89, 93, 97, 101, - 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, - 149, 154, 160, 168, 171, 174, 177, 180, 183, 186, - 189, 192 + 0, 70, 70, 74, 81, 84, 92, 96, 100, 104, + 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, + 152, 157, 163, 171, 174, 177, 180, 183, 186, 189, + 192, 195 }; #endif @@ -1425,35 +1428,35 @@ yyreduce: { case 2: /* Line 1792 of yacc.c */ -#line 68 "src/IceStorm/Grammar.y" +#line 71 "src/IceStorm/Grammar.y" { } break; case 3: /* Line 1792 of yacc.c */ -#line 71 "src/IceStorm/Grammar.y" +#line 74 "src/IceStorm/Grammar.y" { } break; case 4: /* Line 1792 of yacc.c */ -#line 79 "src/IceStorm/Grammar.y" +#line 82 "src/IceStorm/Grammar.y" { } break; case 5: /* Line 1792 of yacc.c */ -#line 82 "src/IceStorm/Grammar.y" +#line 85 "src/IceStorm/Grammar.y" { } break; case 6: /* Line 1792 of yacc.c */ -#line 90 "src/IceStorm/Grammar.y" +#line 93 "src/IceStorm/Grammar.y" { parser->usage(); } @@ -1461,7 +1464,7 @@ yyreduce: case 7: /* Line 1792 of yacc.c */ -#line 94 "src/IceStorm/Grammar.y" +#line 97 "src/IceStorm/Grammar.y" { return 0; } @@ -1469,7 +1472,7 @@ yyreduce: case 8: /* Line 1792 of yacc.c */ -#line 98 "src/IceStorm/Grammar.y" +#line 101 "src/IceStorm/Grammar.y" { parser->create((yyvsp[(2) - (3)])); } @@ -1477,7 +1480,7 @@ yyreduce: case 9: /* Line 1792 of yacc.c */ -#line 102 "src/IceStorm/Grammar.y" +#line 105 "src/IceStorm/Grammar.y" { parser->current((yyvsp[(2) - (3)])); } @@ -1485,7 +1488,7 @@ yyreduce: case 10: /* Line 1792 of yacc.c */ -#line 106 "src/IceStorm/Grammar.y" +#line 109 "src/IceStorm/Grammar.y" { parser->destroy((yyvsp[(2) - (3)])); } @@ -1493,7 +1496,7 @@ yyreduce: case 11: /* Line 1792 of yacc.c */ -#line 110 "src/IceStorm/Grammar.y" +#line 113 "src/IceStorm/Grammar.y" { parser->link((yyvsp[(2) - (3)])); } @@ -1501,7 +1504,7 @@ yyreduce: case 12: /* Line 1792 of yacc.c */ -#line 114 "src/IceStorm/Grammar.y" +#line 117 "src/IceStorm/Grammar.y" { parser->unlink((yyvsp[(2) - (3)])); } @@ -1509,7 +1512,7 @@ yyreduce: case 13: /* Line 1792 of yacc.c */ -#line 118 "src/IceStorm/Grammar.y" +#line 121 "src/IceStorm/Grammar.y" { parser->links((yyvsp[(2) - (3)])); } @@ -1517,7 +1520,7 @@ yyreduce: case 14: /* Line 1792 of yacc.c */ -#line 122 "src/IceStorm/Grammar.y" +#line 125 "src/IceStorm/Grammar.y" { parser->topics((yyvsp[(2) - (3)])); } @@ -1525,7 +1528,7 @@ yyreduce: case 15: /* Line 1792 of yacc.c */ -#line 126 "src/IceStorm/Grammar.y" +#line 129 "src/IceStorm/Grammar.y" { parser->replica((yyvsp[(2) - (3)])); } @@ -1533,7 +1536,7 @@ yyreduce: case 16: /* Line 1792 of yacc.c */ -#line 130 "src/IceStorm/Grammar.y" +#line 133 "src/IceStorm/Grammar.y" { parser->subscribers((yyvsp[(2) - (3)])); } @@ -1541,7 +1544,7 @@ yyreduce: case 17: /* Line 1792 of yacc.c */ -#line 134 "src/IceStorm/Grammar.y" +#line 137 "src/IceStorm/Grammar.y" { parser->invalidCommand("unknown command `" + (yyvsp[(1) - (3)]).front() + "' (type `help' for more info)"); } @@ -1549,7 +1552,7 @@ yyreduce: case 18: /* Line 1792 of yacc.c */ -#line 138 "src/IceStorm/Grammar.y" +#line 141 "src/IceStorm/Grammar.y" { yyerrok; } @@ -1557,14 +1560,14 @@ yyreduce: case 19: /* Line 1792 of yacc.c */ -#line 142 "src/IceStorm/Grammar.y" +#line 145 "src/IceStorm/Grammar.y" { } break; case 20: /* Line 1792 of yacc.c */ -#line 150 "src/IceStorm/Grammar.y" +#line 153 "src/IceStorm/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1573,7 +1576,7 @@ yyreduce: case 21: /* Line 1792 of yacc.c */ -#line 155 "src/IceStorm/Grammar.y" +#line 158 "src/IceStorm/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1582,7 +1585,7 @@ yyreduce: case 22: /* Line 1792 of yacc.c */ -#line 160 "src/IceStorm/Grammar.y" +#line 163 "src/IceStorm/Grammar.y" { (yyval) = YYSTYPE(); } @@ -1590,70 +1593,70 @@ yyreduce: case 23: /* Line 1792 of yacc.c */ -#line 169 "src/IceStorm/Grammar.y" +#line 172 "src/IceStorm/Grammar.y" { } break; case 24: /* Line 1792 of yacc.c */ -#line 172 "src/IceStorm/Grammar.y" +#line 175 "src/IceStorm/Grammar.y" { } break; case 25: /* Line 1792 of yacc.c */ -#line 175 "src/IceStorm/Grammar.y" +#line 178 "src/IceStorm/Grammar.y" { } break; case 26: /* Line 1792 of yacc.c */ -#line 178 "src/IceStorm/Grammar.y" +#line 181 "src/IceStorm/Grammar.y" { } break; case 27: /* Line 1792 of yacc.c */ -#line 181 "src/IceStorm/Grammar.y" +#line 184 "src/IceStorm/Grammar.y" { } break; case 28: /* Line 1792 of yacc.c */ -#line 184 "src/IceStorm/Grammar.y" +#line 187 "src/IceStorm/Grammar.y" { } break; case 29: /* Line 1792 of yacc.c */ -#line 187 "src/IceStorm/Grammar.y" +#line 190 "src/IceStorm/Grammar.y" { } break; case 30: /* Line 1792 of yacc.c */ -#line 190 "src/IceStorm/Grammar.y" +#line 193 "src/IceStorm/Grammar.y" { } break; case 31: /* Line 1792 of yacc.c */ -#line 193 "src/IceStorm/Grammar.y" +#line 196 "src/IceStorm/Grammar.y" { } break; /* Line 1792 of yacc.c */ -#line 1657 "src/IceStorm/Grammar.cpp" +#line 1660 "src/IceStorm/Grammar.cpp" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1885,5 +1888,5 @@ yyreturn: /* Line 2055 of yacc.c */ -#line 196 "src/IceStorm/Grammar.y" +#line 199 "src/IceStorm/Grammar.y" diff --git a/cpp/src/IceStorm/Grammar.h b/cpp/src/IceStorm/Grammar.h index adb9fc2a98e..0fa1457e828 100644 --- a/cpp/src/IceStorm/Grammar.h +++ b/cpp/src/IceStorm/Grammar.h @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7. */ /* Bison interface for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ diff --git a/cpp/src/IceStorm/Grammar.y b/cpp/src/IceStorm/Grammar.y index 39faebd27e8..6ff3c5b28a8 100644 --- a/cpp/src/IceStorm/Grammar.y +++ b/cpp/src/IceStorm/Grammar.y @@ -13,11 +13,14 @@ #include <IceStorm/Parser.h> #ifdef _MSC_VER -// I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label -# pragma warning( disable : 4102 ) +# pragma warning(disable:4102) // warning C4065: switch statement contains 'default' but no 'case' labels -# pragma warning( disable : 4065 ) +# pragma warning(disable:4065) +// warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data +# pragma warning(disable:4244) +// warning C4702: unreachable code +# pragma warning(disable:4702) #endif // diff --git a/cpp/src/IceStorm/Scanner.cpp b/cpp/src/IceStorm/Scanner.cpp index 23167f6b11c..eaf372dad78 100644 --- a/cpp/src/IceStorm/Scanner.cpp +++ b/cpp/src/IceStorm/Scanner.cpp @@ -35,7 +35,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -52,7 +52,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -169,7 +169,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -226,7 +226,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -475,24 +475,19 @@ char *yytext; #include <IceStorm/Parser.h> #include <IceStorm/Grammar.h> -#if defined(_MSC_VER) && defined(ICE_64) -// -// '=' : conversion from 'size_t' to 'int', possible loss of data -// The result of fread() is a size_t and gets inserted into an int -// -# pragma warning( 4 : 4267 ) -// +#if defined(_MSC_VER) +// '<' : signed/unsigned mismatch +# pragma warning(disable:4018) // 'initializing' : conversion from '__int64' to 'int', possible loss of data -// Puts a pointer-difference into an int -// -# pragma warning( 4 : 4244 ) -#endif +# pragma warning(disable:4244) -#if defined(_MSC_VER) && defined(ICE_32) +# if defined(ICE_64) // -// '<' : signed/unsigned mismatch +// '=' : conversion from 'size_t' to 'int', possible loss of data +// The result of fread() is a size_t and gets inserted into an int // -# pragma warning( 4 : 4018 ) +# pragma warning(disable:4267) +# endif #endif #if defined(__GNUC__) @@ -534,7 +529,7 @@ void initScanner(); } #define YY_USER_INIT initScanner(); -#line 537 "src/IceStorm/Scanner.cpp" +#line 532 "src/IceStorm/Scanner.cpp" #define INITIAL 0 @@ -594,7 +589,7 @@ extern int yywrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -715,11 +710,11 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; + +#line 79 "src/IceStorm/Scanner.l" -#line 84 "src/IceStorm/Scanner.l" - -#line 722 "src/IceStorm/Scanner.cpp" +#line 717 "src/IceStorm/Scanner.cpp" if ( !(yy_init) ) { @@ -804,7 +799,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 86 "src/IceStorm/Scanner.l" +#line 81 "src/IceStorm/Scanner.l" { // C++-style comment int c; @@ -817,7 +812,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 96 "src/IceStorm/Scanner.l" +#line 91 "src/IceStorm/Scanner.l" { // C-style comment while(true) @@ -846,7 +841,7 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 121 "src/IceStorm/Scanner.l" +#line 116 "src/IceStorm/Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -861,14 +856,14 @@ YY_RULE_SETUP case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 132 "src/IceStorm/Scanner.l" +#line 127 "src/IceStorm/Scanner.l" { return ';'; } YY_BREAK case 5: YY_RULE_SETUP -#line 136 "src/IceStorm/Scanner.l" +#line 131 "src/IceStorm/Scanner.l" { // "..."-type strings string s; @@ -915,7 +910,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 180 "src/IceStorm/Scanner.l" +#line 175 "src/IceStorm/Scanner.l" { // '...'-type strings string s; @@ -943,7 +938,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 205 "src/IceStorm/Scanner.l" +#line 200 "src/IceStorm/Scanner.l" { // Simple strings string s; @@ -973,10 +968,10 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 232 "src/IceStorm/Scanner.l" +#line 227 "src/IceStorm/Scanner.l" ECHO; YY_BREAK -#line 979 "src/IceStorm/Scanner.cpp" +#line 974 "src/IceStorm/Scanner.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1254,7 +1249,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) @@ -1308,7 +1303,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ @@ -1351,7 +1346,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1418,12 +1413,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1436,11 +1431,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); @@ -1480,13 +1475,13 @@ static void yy_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1509,11 +1504,11 @@ static void yy_load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1534,7 +1529,7 @@ static void yy_load_buffer_state (void) { int oerrno = errno; - + yy_flush_buffer(b ); b->yy_input_file = file; @@ -1556,7 +1551,7 @@ static void yy_load_buffer_state (void) /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { @@ -1585,7 +1580,7 @@ static void yy_load_buffer_state (void) * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -1615,7 +1610,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void yypop_buffer_state (void) { @@ -1639,7 +1634,7 @@ void yypop_buffer_state (void) static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -1652,9 +1647,9 @@ static void yyensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -1682,13 +1677,13 @@ static void yyensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1717,14 +1712,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - + return yy_scan_bytes(yystr,strlen(yystr) ); } @@ -1732,7 +1727,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) @@ -1741,7 +1736,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); @@ -1795,16 +1790,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyget_lineno (void) { - + return yylineno; } /** Get the input stream. - * + * */ FILE *yyget_in (void) { @@ -1812,7 +1807,7 @@ FILE *yyget_in (void) } /** Get the output stream. - * + * */ FILE *yyget_out (void) { @@ -1820,7 +1815,7 @@ FILE *yyget_out (void) } /** Get the length of the current token. - * + * */ yy_size_t yyget_leng (void) { @@ -1828,7 +1823,7 @@ yy_size_t yyget_leng (void) } /** Get the current token. - * + * */ char *yyget_text (void) @@ -1838,18 +1833,18 @@ char *yyget_text (void) /** Set the current line number. * @param line_number - * + * */ void yyset_lineno (int line_number ) { - + yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) @@ -1903,7 +1898,7 @@ static int yy_init_globals (void) /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); @@ -1970,7 +1965,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 232 "src/IceStorm/Scanner.l" +#line 227 "src/IceStorm/Scanner.l" diff --git a/cpp/src/IceStorm/Scanner.l b/cpp/src/IceStorm/Scanner.l index 895cbca52fd..72929d99d7c 100644 --- a/cpp/src/IceStorm/Scanner.l +++ b/cpp/src/IceStorm/Scanner.l @@ -13,24 +13,19 @@ #include <IceStorm/Parser.h> #include <IceStorm/Grammar.h> -#if defined(_MSC_VER) && defined(ICE_64) -// -// '=' : conversion from 'size_t' to 'int', possible loss of data -// The result of fread() is a size_t and gets inserted into an int -// -# pragma warning( 4 : 4267 ) -// +#if defined(_MSC_VER) +// '<' : signed/unsigned mismatch +# pragma warning(disable:4018) // 'initializing' : conversion from '__int64' to 'int', possible loss of data -// Puts a pointer-difference into an int -// -# pragma warning( 4 : 4244 ) -#endif +# pragma warning(disable:4244) -#if defined(_MSC_VER) && defined(ICE_32) +# if defined(ICE_64) // -// '<' : signed/unsigned mismatch +// '=' : conversion from 'size_t' to 'int', possible loss of data +// The result of fread() is a size_t and gets inserted into an int // -# pragma warning( 4 : 4018 ) +# pragma warning(disable:4267) +# endif #endif #if defined(__GNUC__) diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index ad37e967dd5..76f03908817 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -285,7 +285,7 @@ TopicManagerImpl::TopicManagerImpl(const PersistentInstancePtr& instance) : Ice::Identity topic = k.topic; SubscriberRecordSeq content; - while((moreTopics = cursor.get(k, v, MDB_NEXT)) && k.topic == topic) + while((moreTopics = cursor.get(k, v, MDB_NEXT)) == true && k.topic == topic) { content.push_back(v); } diff --git a/cpp/src/IceUtil/StringUtil.cpp b/cpp/src/IceUtil/StringUtil.cpp index f8a2b143bee..6fb40ec3085 100644 --- a/cpp/src/IceUtil/StringUtil.cpp +++ b/cpp/src/IceUtil/StringUtil.cpp @@ -1129,7 +1129,7 @@ IceUtilInternal::toLower(const std::string& s) { if(isascii(s[i])) { - result += tolower(static_cast<unsigned char>(s[i])); + result += static_cast<char>(tolower(static_cast<unsigned char>(s[i]))); } else { @@ -1148,7 +1148,7 @@ IceUtilInternal::toUpper(const std::string& s) { if(isascii(s[i])) { - result += toupper(static_cast<unsigned char>(s[i])); + result += static_cast<char>(toupper(static_cast<unsigned char>(s[i]))); } else { diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp index 718f688fb9e..c9de3dc6b22 100644 --- a/cpp/src/Slice/Grammar.cpp +++ b/cpp/src/Slice/Grammar.cpp @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -88,11 +88,12 @@ #include <cstring> #ifdef _MSC_VER -// I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label -# pragma warning( disable : 4102 ) +# pragma warning(disable:4102) // warning C4065: switch statement contains 'default' but no 'case' labels -# pragma warning( disable : 4065 ) +# pragma warning(disable:4065) +// warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data +# pragma warning(disable:4244) #endif // @@ -123,7 +124,7 @@ slice_error(const char* s) /* Line 371 of yacc.c */ -#line 127 "src/Slice/Grammar.cpp" +#line 128 "src/Slice/Grammar.cpp" # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -233,7 +234,7 @@ int slice_parse (); /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ -#line 237 "src/Slice/Grammar.cpp" +#line 238 "src/Slice/Grammar.cpp" #ifdef short # undef short @@ -609,29 +610,29 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 114, 114, 122, 126, 133, 142, 147, 156, 155, - 165, 164, 175, 183, 182, 188, 187, 192, 197, 196, - 202, 201, 206, 211, 210, 216, 215, 220, 225, 224, - 230, 229, 234, 239, 238, 244, 243, 248, 253, 252, - 257, 262, 261, 267, 266, 271, 275, 285, 284, 318, - 322, 333, 344, 343, 370, 379, 387, 396, 399, 404, - 411, 424, 444, 537, 545, 558, 566, 581, 587, 591, - 602, 613, 612, 654, 663, 666, 671, 678, 684, 688, - 699, 724, 826, 838, 852, 851, 891, 926, 934, 939, - 947, 956, 959, 964, 971, 993, 1020, 1042, 1068, 1077, - 1088, 1097, 1106, 1116, 1130, 1136, 1144, 1156, 1180, 1205, - 1229, 1260, 1259, 1282, 1281, 1304, 1305, 1311, 1315, 1326, - 1341, 1340, 1375, 1410, 1445, 1450, 1460, 1465, 1473, 1482, - 1485, 1490, 1497, 1503, 1510, 1522, 1534, 1545, 1554, 1569, - 1580, 1597, 1601, 1613, 1612, 1645, 1644, 1663, 1669, 1677, - 1689, 1709, 1717, 1726, 1730, 1769, 1776, 1787, 1789, 1805, - 1821, 1833, 1845, 1856, 1872, 1877, 1885, 1888, 1896, 1900, - 1904, 1908, 1912, 1916, 1920, 1924, 1928, 1932, 1936, 1940, - 1944, 1963, 2004, 2010, 2018, 2025, 2037, 2044, 2054, 2067, - 2080, 2127, 2138, 2149, 2165, 2174, 2188, 2191, 2194, 2197, - 2200, 2203, 2206, 2209, 2212, 2215, 2218, 2221, 2224, 2227, - 2230, 2233, 2236, 2239, 2242, 2245, 2248, 2251, 2254, 2257, - 2260, 2263, 2266, 2269, 2272, 2275 + 0, 115, 115, 123, 127, 134, 143, 148, 157, 156, + 166, 165, 176, 184, 183, 189, 188, 193, 198, 197, + 203, 202, 207, 212, 211, 217, 216, 221, 226, 225, + 231, 230, 235, 240, 239, 245, 244, 249, 254, 253, + 258, 263, 262, 268, 267, 272, 276, 286, 285, 319, + 323, 334, 345, 344, 371, 380, 388, 397, 400, 405, + 412, 425, 445, 538, 546, 559, 567, 582, 588, 592, + 603, 614, 613, 655, 664, 667, 672, 679, 685, 689, + 700, 725, 827, 839, 853, 852, 892, 927, 935, 940, + 948, 957, 960, 965, 972, 994, 1021, 1043, 1069, 1078, + 1089, 1098, 1107, 1117, 1131, 1137, 1145, 1157, 1181, 1206, + 1230, 1261, 1260, 1283, 1282, 1305, 1306, 1312, 1316, 1327, + 1342, 1341, 1376, 1411, 1446, 1451, 1461, 1466, 1474, 1483, + 1486, 1491, 1498, 1504, 1511, 1523, 1535, 1546, 1555, 1570, + 1581, 1598, 1602, 1614, 1613, 1646, 1645, 1664, 1670, 1678, + 1690, 1710, 1718, 1727, 1731, 1770, 1777, 1788, 1790, 1806, + 1822, 1834, 1846, 1857, 1873, 1878, 1886, 1889, 1897, 1901, + 1905, 1909, 1913, 1917, 1921, 1925, 1929, 1933, 1937, 1941, + 1945, 1964, 2005, 2011, 2019, 2026, 2038, 2045, 2055, 2068, + 2081, 2128, 2139, 2150, 2166, 2175, 2189, 2192, 2195, 2198, + 2201, 2204, 2207, 2210, 2213, 2216, 2219, 2222, 2225, 2228, + 2231, 2234, 2237, 2240, 2243, 2246, 2249, 2252, 2255, 2258, + 2261, 2264, 2267, 2270, 2273, 2276 }; #endif @@ -1893,28 +1894,28 @@ yyreduce: { case 2: /* Line 1792 of yacc.c */ -#line 115 "src/Slice/Grammar.y" +#line 116 "src/Slice/Grammar.y" { } break; case 3: /* Line 1792 of yacc.c */ -#line 123 "src/Slice/Grammar.y" +#line 124 "src/Slice/Grammar.y" { } break; case 4: /* Line 1792 of yacc.c */ -#line 126 "src/Slice/Grammar.y" +#line 127 "src/Slice/Grammar.y" { } break; case 5: /* Line 1792 of yacc.c */ -#line 134 "src/Slice/Grammar.y" +#line 135 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); } @@ -1922,7 +1923,7 @@ yyreduce: case 6: /* Line 1792 of yacc.c */ -#line 143 "src/Slice/Grammar.y" +#line 144 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (3)]); } @@ -1930,7 +1931,7 @@ yyreduce: case 7: /* Line 1792 of yacc.c */ -#line 147 "src/Slice/Grammar.y" +#line 148 "src/Slice/Grammar.y" { (yyval) = new StringListTok; } @@ -1938,7 +1939,7 @@ yyreduce: case 8: /* Line 1792 of yacc.c */ -#line 156 "src/Slice/Grammar.y" +#line 157 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (1)])); if(!metaData->v.empty()) @@ -1950,7 +1951,7 @@ yyreduce: case 10: /* Line 1792 of yacc.c */ -#line 165 "src/Slice/Grammar.y" +#line 166 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (2)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -1963,14 +1964,14 @@ yyreduce: case 12: /* Line 1792 of yacc.c */ -#line 175 "src/Slice/Grammar.y" +#line 176 "src/Slice/Grammar.y" { } break; case 13: /* Line 1792 of yacc.c */ -#line 183 "src/Slice/Grammar.y" +#line 184 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ModulePtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -1978,7 +1979,7 @@ yyreduce: case 15: /* Line 1792 of yacc.c */ -#line 188 "src/Slice/Grammar.y" +#line 189 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -1986,7 +1987,7 @@ yyreduce: case 17: /* Line 1792 of yacc.c */ -#line 193 "src/Slice/Grammar.y" +#line 194 "src/Slice/Grammar.y" { unit->error("`;' missing after class forward declaration"); } @@ -1994,7 +1995,7 @@ yyreduce: case 18: /* Line 1792 of yacc.c */ -#line 197 "src/Slice/Grammar.y" +#line 198 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2002,7 +2003,7 @@ yyreduce: case 20: /* Line 1792 of yacc.c */ -#line 202 "src/Slice/Grammar.y" +#line 203 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDeclPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2010,7 +2011,7 @@ yyreduce: case 22: /* Line 1792 of yacc.c */ -#line 207 "src/Slice/Grammar.y" +#line 208 "src/Slice/Grammar.y" { unit->error("`;' missing after interface forward declaration"); } @@ -2018,7 +2019,7 @@ yyreduce: case 23: /* Line 1792 of yacc.c */ -#line 211 "src/Slice/Grammar.y" +#line 212 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ClassDefPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2026,7 +2027,7 @@ yyreduce: case 25: /* Line 1792 of yacc.c */ -#line 216 "src/Slice/Grammar.y" +#line 217 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0); } @@ -2034,7 +2035,7 @@ yyreduce: case 27: /* Line 1792 of yacc.c */ -#line 221 "src/Slice/Grammar.y" +#line 222 "src/Slice/Grammar.y" { unit->error("`;' missing after exception forward declaration"); } @@ -2042,7 +2043,7 @@ yyreduce: case 28: /* Line 1792 of yacc.c */ -#line 225 "src/Slice/Grammar.y" +#line 226 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ExceptionPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2050,7 +2051,7 @@ yyreduce: case 30: /* Line 1792 of yacc.c */ -#line 230 "src/Slice/Grammar.y" +#line 231 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0); } @@ -2058,7 +2059,7 @@ yyreduce: case 32: /* Line 1792 of yacc.c */ -#line 235 "src/Slice/Grammar.y" +#line 236 "src/Slice/Grammar.y" { unit->error("`;' missing after struct forward declaration"); } @@ -2066,7 +2067,7 @@ yyreduce: case 33: /* Line 1792 of yacc.c */ -#line 239 "src/Slice/Grammar.y" +#line 240 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || StructPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2074,7 +2075,7 @@ yyreduce: case 35: /* Line 1792 of yacc.c */ -#line 244 "src/Slice/Grammar.y" +#line 245 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || SequencePtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2082,7 +2083,7 @@ yyreduce: case 37: /* Line 1792 of yacc.c */ -#line 249 "src/Slice/Grammar.y" +#line 250 "src/Slice/Grammar.y" { unit->error("`;' missing after sequence definition"); } @@ -2090,7 +2091,7 @@ yyreduce: case 38: /* Line 1792 of yacc.c */ -#line 253 "src/Slice/Grammar.y" +#line 254 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || DictionaryPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2098,7 +2099,7 @@ yyreduce: case 40: /* Line 1792 of yacc.c */ -#line 258 "src/Slice/Grammar.y" +#line 259 "src/Slice/Grammar.y" { unit->error("`;' missing after dictionary definition"); } @@ -2106,7 +2107,7 @@ yyreduce: case 41: /* Line 1792 of yacc.c */ -#line 262 "src/Slice/Grammar.y" +#line 263 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || EnumPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2114,7 +2115,7 @@ yyreduce: case 43: /* Line 1792 of yacc.c */ -#line 267 "src/Slice/Grammar.y" +#line 268 "src/Slice/Grammar.y" { assert((yyvsp[(1) - (1)]) == 0 || ConstPtr::dynamicCast((yyvsp[(1) - (1)]))); } @@ -2122,7 +2123,7 @@ yyreduce: case 45: /* Line 1792 of yacc.c */ -#line 272 "src/Slice/Grammar.y" +#line 273 "src/Slice/Grammar.y" { unit->error("`;' missing after const definition"); } @@ -2130,7 +2131,7 @@ yyreduce: case 46: /* Line 1792 of yacc.c */ -#line 276 "src/Slice/Grammar.y" +#line 277 "src/Slice/Grammar.y" { yyerrok; } @@ -2138,7 +2139,7 @@ yyreduce: case 47: /* Line 1792 of yacc.c */ -#line 285 "src/Slice/Grammar.y" +#line 286 "src/Slice/Grammar.y" { unit->setSeenDefinition(); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2159,7 +2160,7 @@ yyreduce: case 48: /* Line 1792 of yacc.c */ -#line 302 "src/Slice/Grammar.y" +#line 303 "src/Slice/Grammar.y" { if((yyvsp[(3) - (6)])) { @@ -2175,7 +2176,7 @@ yyreduce: case 49: /* Line 1792 of yacc.c */ -#line 319 "src/Slice/Grammar.y" +#line 320 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -2183,7 +2184,7 @@ yyreduce: case 50: /* Line 1792 of yacc.c */ -#line 323 "src/Slice/Grammar.y" +#line 324 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); @@ -2193,7 +2194,7 @@ yyreduce: case 51: /* Line 1792 of yacc.c */ -#line 334 "src/Slice/Grammar.y" +#line 335 "src/Slice/Grammar.y" { unit->error("exceptions cannot be forward declared"); (yyval) = 0; @@ -2202,7 +2203,7 @@ yyreduce: case 52: /* Line 1792 of yacc.c */ -#line 344 "src/Slice/Grammar.y" +#line 345 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2220,7 +2221,7 @@ yyreduce: case 53: /* Line 1792 of yacc.c */ -#line 358 "src/Slice/Grammar.y" +#line 359 "src/Slice/Grammar.y" { if((yyvsp[(4) - (7)])) { @@ -2232,7 +2233,7 @@ yyreduce: case 54: /* Line 1792 of yacc.c */ -#line 371 "src/Slice/Grammar.y" +#line 372 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -2244,7 +2245,7 @@ yyreduce: case 55: /* Line 1792 of yacc.c */ -#line 379 "src/Slice/Grammar.y" +#line 380 "src/Slice/Grammar.y" { (yyval) = 0; } @@ -2252,7 +2253,7 @@ yyreduce: case 56: /* Line 1792 of yacc.c */ -#line 388 "src/Slice/Grammar.y" +#line 389 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2265,14 +2266,14 @@ yyreduce: case 57: /* Line 1792 of yacc.c */ -#line 397 "src/Slice/Grammar.y" +#line 398 "src/Slice/Grammar.y" { } break; case 58: /* Line 1792 of yacc.c */ -#line 400 "src/Slice/Grammar.y" +#line 401 "src/Slice/Grammar.y" { unit->error("`;' missing after definition"); } @@ -2280,14 +2281,14 @@ yyreduce: case 59: /* Line 1792 of yacc.c */ -#line 404 "src/Slice/Grammar.y" +#line 405 "src/Slice/Grammar.y" { } break; case 60: /* Line 1792 of yacc.c */ -#line 412 "src/Slice/Grammar.y" +#line 413 "src/Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2299,7 +2300,7 @@ yyreduce: case 61: /* Line 1792 of yacc.c */ -#line 425 "src/Slice/Grammar.y" +#line 426 "src/Slice/Grammar.y" { IntegerTokPtr i = IntegerTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2323,7 +2324,7 @@ yyreduce: case 62: /* Line 1792 of yacc.c */ -#line 445 "src/Slice/Grammar.y" +#line 446 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -2420,7 +2421,7 @@ yyreduce: case 63: /* Line 1792 of yacc.c */ -#line 538 "src/Slice/Grammar.y" +#line 539 "src/Slice/Grammar.y" { unit->error("missing tag for optional"); OptionalDefTokPtr m = new OptionalDefTok; // Dummy @@ -2432,7 +2433,7 @@ yyreduce: case 64: /* Line 1792 of yacc.c */ -#line 546 "src/Slice/Grammar.y" +#line 547 "src/Slice/Grammar.y" { unit->error("missing tag for optional"); OptionalDefTokPtr m = new OptionalDefTok; // Dummy @@ -2444,7 +2445,7 @@ yyreduce: case 65: /* Line 1792 of yacc.c */ -#line 559 "src/Slice/Grammar.y" +#line 560 "src/Slice/Grammar.y" { OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2456,7 +2457,7 @@ yyreduce: case 66: /* Line 1792 of yacc.c */ -#line 567 "src/Slice/Grammar.y" +#line 568 "src/Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)])); OptionalDefTokPtr m = new OptionalDefTok; @@ -2470,7 +2471,7 @@ yyreduce: case 68: /* Line 1792 of yacc.c */ -#line 588 "src/Slice/Grammar.y" +#line 589 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -2478,7 +2479,7 @@ yyreduce: case 69: /* Line 1792 of yacc.c */ -#line 592 "src/Slice/Grammar.y" +#line 593 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as struct name"); @@ -2488,7 +2489,7 @@ yyreduce: case 70: /* Line 1792 of yacc.c */ -#line 603 "src/Slice/Grammar.y" +#line 604 "src/Slice/Grammar.y" { unit->error("structs cannot be forward declared"); (yyval) = 0; // Dummy @@ -2497,7 +2498,7 @@ yyreduce: case 71: /* Line 1792 of yacc.c */ -#line 613 "src/Slice/Grammar.y" +#line 614 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2520,7 +2521,7 @@ yyreduce: case 72: /* Line 1792 of yacc.c */ -#line 632 "src/Slice/Grammar.y" +#line 633 "src/Slice/Grammar.y" { if((yyvsp[(3) - (6)])) { @@ -2542,7 +2543,7 @@ yyreduce: case 73: /* Line 1792 of yacc.c */ -#line 655 "src/Slice/Grammar.y" +#line 656 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2555,14 +2556,14 @@ yyreduce: case 74: /* Line 1792 of yacc.c */ -#line 664 "src/Slice/Grammar.y" +#line 665 "src/Slice/Grammar.y" { } break; case 75: /* Line 1792 of yacc.c */ -#line 667 "src/Slice/Grammar.y" +#line 668 "src/Slice/Grammar.y" { unit->error("`;' missing after definition"); } @@ -2570,14 +2571,14 @@ yyreduce: case 76: /* Line 1792 of yacc.c */ -#line 671 "src/Slice/Grammar.y" +#line 672 "src/Slice/Grammar.y" { } break; case 78: /* Line 1792 of yacc.c */ -#line 685 "src/Slice/Grammar.y" +#line 686 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -2585,7 +2586,7 @@ yyreduce: case 79: /* Line 1792 of yacc.c */ -#line 689 "src/Slice/Grammar.y" +#line 690 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as class name"); @@ -2595,7 +2596,7 @@ yyreduce: case 80: /* Line 1792 of yacc.c */ -#line 700 "src/Slice/Grammar.y" +#line 701 "src/Slice/Grammar.y" { IceUtil::Int64 id = IntegerTokPtr::dynamicCast((yyvsp[(3) - (4)]))->v; if(id < 0) @@ -2624,7 +2625,7 @@ yyreduce: case 81: /* Line 1792 of yacc.c */ -#line 725 "src/Slice/Grammar.y" +#line 726 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(3) - (4)])); @@ -2730,7 +2731,7 @@ yyreduce: case 82: /* Line 1792 of yacc.c */ -#line 827 "src/Slice/Grammar.y" +#line 828 "src/Slice/Grammar.y" { ClassIdTokPtr classId = new ClassIdTok(); classId->v = StringTokPtr::dynamicCast((yyvsp[(1) - (1)]))->v; @@ -2741,7 +2742,7 @@ yyreduce: case 83: /* Line 1792 of yacc.c */ -#line 839 "src/Slice/Grammar.y" +#line 840 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -2753,7 +2754,7 @@ yyreduce: case 84: /* Line 1792 of yacc.c */ -#line 852 "src/Slice/Grammar.y" +#line 853 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); ClassIdTokPtr ident = ClassIdTokPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2780,7 +2781,7 @@ yyreduce: case 85: /* Line 1792 of yacc.c */ -#line 875 "src/Slice/Grammar.y" +#line 876 "src/Slice/Grammar.y" { if((yyvsp[(5) - (8)])) { @@ -2796,7 +2797,7 @@ yyreduce: case 86: /* Line 1792 of yacc.c */ -#line 892 "src/Slice/Grammar.y" +#line 893 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -2834,7 +2835,7 @@ yyreduce: case 87: /* Line 1792 of yacc.c */ -#line 926 "src/Slice/Grammar.y" +#line 927 "src/Slice/Grammar.y" { (yyval) = 0; } @@ -2842,7 +2843,7 @@ yyreduce: case 88: /* Line 1792 of yacc.c */ -#line 935 "src/Slice/Grammar.y" +#line 936 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -2850,7 +2851,7 @@ yyreduce: case 89: /* Line 1792 of yacc.c */ -#line 939 "src/Slice/Grammar.y" +#line 940 "src/Slice/Grammar.y" { (yyval) = new ClassListTok; } @@ -2858,7 +2859,7 @@ yyreduce: case 90: /* Line 1792 of yacc.c */ -#line 948 "src/Slice/Grammar.y" +#line 949 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -2871,14 +2872,14 @@ yyreduce: case 91: /* Line 1792 of yacc.c */ -#line 957 "src/Slice/Grammar.y" +#line 958 "src/Slice/Grammar.y" { } break; case 92: /* Line 1792 of yacc.c */ -#line 960 "src/Slice/Grammar.y" +#line 961 "src/Slice/Grammar.y" { unit->error("`;' missing after definition"); } @@ -2886,14 +2887,14 @@ yyreduce: case 93: /* Line 1792 of yacc.c */ -#line 964 "src/Slice/Grammar.y" +#line 965 "src/Slice/Grammar.y" { } break; case 94: /* Line 1792 of yacc.c */ -#line 972 "src/Slice/Grammar.y" +#line 973 "src/Slice/Grammar.y" { OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (1)])); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); @@ -2919,7 +2920,7 @@ yyreduce: case 95: /* Line 1792 of yacc.c */ -#line 994 "src/Slice/Grammar.y" +#line 995 "src/Slice/Grammar.y" { OptionalDefTokPtr def = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (3)])); ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -2950,7 +2951,7 @@ yyreduce: case 96: /* Line 1792 of yacc.c */ -#line 1021 "src/Slice/Grammar.y" +#line 1022 "src/Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -2976,7 +2977,7 @@ yyreduce: case 97: /* Line 1792 of yacc.c */ -#line 1043 "src/Slice/Grammar.y" +#line 1044 "src/Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); ClassDefPtr cl = ClassDefPtr::dynamicCast(unit->currentContainer()); @@ -3001,7 +3002,7 @@ yyreduce: case 98: /* Line 1792 of yacc.c */ -#line 1069 "src/Slice/Grammar.y" +#line 1070 "src/Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (1)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -3014,7 +3015,7 @@ yyreduce: case 99: /* Line 1792 of yacc.c */ -#line 1078 "src/Slice/Grammar.y" +#line 1079 "src/Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(1) - (3)])); ConstDefTokPtr value = ConstDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3029,7 +3030,7 @@ yyreduce: case 100: /* Line 1792 of yacc.c */ -#line 1089 "src/Slice/Grammar.y" +#line 1090 "src/Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (2)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -3042,7 +3043,7 @@ yyreduce: case 101: /* Line 1792 of yacc.c */ -#line 1098 "src/Slice/Grammar.y" +#line 1099 "src/Slice/Grammar.y" { TypeStringTokPtr ts = TypeStringTokPtr::dynamicCast((yyvsp[(2) - (4)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -3055,7 +3056,7 @@ yyreduce: case 102: /* Line 1792 of yacc.c */ -#line 1107 "src/Slice/Grammar.y" +#line 1108 "src/Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -3069,7 +3070,7 @@ yyreduce: case 103: /* Line 1792 of yacc.c */ -#line 1117 "src/Slice/Grammar.y" +#line 1118 "src/Slice/Grammar.y" { TypePtr type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); StructPtr st = StructPtr::dynamicCast(unit->currentContainer()); @@ -3082,7 +3083,7 @@ yyreduce: case 104: /* Line 1792 of yacc.c */ -#line 1131 "src/Slice/Grammar.y" +#line 1132 "src/Slice/Grammar.y" { OptionalDefTokPtr m = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); m->v.type = TypePtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3092,7 +3093,7 @@ yyreduce: case 105: /* Line 1792 of yacc.c */ -#line 1137 "src/Slice/Grammar.y" +#line 1138 "src/Slice/Grammar.y" { OptionalDefTokPtr m = new OptionalDefTok(); m->v.type = TypePtr::dynamicCast((yyvsp[(1) - (1)])); @@ -3104,7 +3105,7 @@ yyreduce: case 106: /* Line 1792 of yacc.c */ -#line 1145 "src/Slice/Grammar.y" +#line 1146 "src/Slice/Grammar.y" { OptionalDefTokPtr m = new OptionalDefTok; m->v.optional = false; @@ -3115,7 +3116,7 @@ yyreduce: case 107: /* Line 1792 of yacc.c */ -#line 1157 "src/Slice/Grammar.y" +#line 1158 "src/Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -3143,7 +3144,7 @@ yyreduce: case 108: /* Line 1792 of yacc.c */ -#line 1181 "src/Slice/Grammar.y" +#line 1182 "src/Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)])); string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; @@ -3172,7 +3173,7 @@ yyreduce: case 109: /* Line 1792 of yacc.c */ -#line 1206 "src/Slice/Grammar.y" +#line 1207 "src/Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(1) - (2)])); string name = StringTokPtr::dynamicCast((yyvsp[(2) - (2)]))->v; @@ -3200,7 +3201,7 @@ yyreduce: case 110: /* Line 1792 of yacc.c */ -#line 1230 "src/Slice/Grammar.y" +#line 1231 "src/Slice/Grammar.y" { OptionalDefTokPtr returnType = OptionalDefTokPtr::dynamicCast((yyvsp[(2) - (3)])); string name = StringTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v; @@ -3229,7 +3230,7 @@ yyreduce: case 111: /* Line 1792 of yacc.c */ -#line 1260 "src/Slice/Grammar.y" +#line 1261 "src/Slice/Grammar.y" { if((yyvsp[(1) - (3)])) { @@ -3245,7 +3246,7 @@ yyreduce: case 112: /* Line 1792 of yacc.c */ -#line 1272 "src/Slice/Grammar.y" +#line 1273 "src/Slice/Grammar.y" { OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3259,7 +3260,7 @@ yyreduce: case 113: /* Line 1792 of yacc.c */ -#line 1282 "src/Slice/Grammar.y" +#line 1283 "src/Slice/Grammar.y" { if((yyvsp[(1) - (3)])) { @@ -3271,7 +3272,7 @@ yyreduce: case 114: /* Line 1792 of yacc.c */ -#line 1290 "src/Slice/Grammar.y" +#line 1291 "src/Slice/Grammar.y" { OperationPtr op = OperationPtr::dynamicCast((yyvsp[(4) - (5)])); ExceptionListTokPtr el = ExceptionListTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3285,7 +3286,7 @@ yyreduce: case 117: /* Line 1792 of yacc.c */ -#line 1312 "src/Slice/Grammar.y" +#line 1313 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -3293,7 +3294,7 @@ yyreduce: case 118: /* Line 1792 of yacc.c */ -#line 1316 "src/Slice/Grammar.y" +#line 1317 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as interface name"); @@ -3303,7 +3304,7 @@ yyreduce: case 119: /* Line 1792 of yacc.c */ -#line 1327 "src/Slice/Grammar.y" +#line 1328 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3316,7 +3317,7 @@ yyreduce: case 120: /* Line 1792 of yacc.c */ -#line 1341 "src/Slice/Grammar.y" +#line 1342 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (3)])); @@ -3338,7 +3339,7 @@ yyreduce: case 121: /* Line 1792 of yacc.c */ -#line 1359 "src/Slice/Grammar.y" +#line 1360 "src/Slice/Grammar.y" { if((yyvsp[(4) - (7)])) { @@ -3354,7 +3355,7 @@ yyreduce: case 122: /* Line 1792 of yacc.c */ -#line 1376 "src/Slice/Grammar.y" +#line 1377 "src/Slice/Grammar.y" { ClassListTokPtr intfs = ClassListTokPtr::dynamicCast((yyvsp[(3) - (3)])); StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -3393,7 +3394,7 @@ yyreduce: case 123: /* Line 1792 of yacc.c */ -#line 1411 "src/Slice/Grammar.y" +#line 1412 "src/Slice/Grammar.y" { ClassListTokPtr intfs = new ClassListTok; StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -3432,7 +3433,7 @@ yyreduce: case 124: /* Line 1792 of yacc.c */ -#line 1446 "src/Slice/Grammar.y" +#line 1447 "src/Slice/Grammar.y" { unit->error("illegal inheritance from type Object"); (yyval) = new ClassListTok; // Dummy @@ -3441,7 +3442,7 @@ yyreduce: case 125: /* Line 1792 of yacc.c */ -#line 1451 "src/Slice/Grammar.y" +#line 1452 "src/Slice/Grammar.y" { unit->error("illegal inheritance from type Value"); (yyval) = new ClassListTok; // Dummy @@ -3450,7 +3451,7 @@ yyreduce: case 126: /* Line 1792 of yacc.c */ -#line 1461 "src/Slice/Grammar.y" +#line 1462 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -3458,7 +3459,7 @@ yyreduce: case 127: /* Line 1792 of yacc.c */ -#line 1465 "src/Slice/Grammar.y" +#line 1466 "src/Slice/Grammar.y" { (yyval) = new ClassListTok; } @@ -3466,7 +3467,7 @@ yyreduce: case 128: /* Line 1792 of yacc.c */ -#line 1474 "src/Slice/Grammar.y" +#line 1475 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(1) - (4)])); ContainedPtr contained = ContainedPtr::dynamicCast((yyvsp[(2) - (4)])); @@ -3479,14 +3480,14 @@ yyreduce: case 129: /* Line 1792 of yacc.c */ -#line 1483 "src/Slice/Grammar.y" +#line 1484 "src/Slice/Grammar.y" { } break; case 130: /* Line 1792 of yacc.c */ -#line 1486 "src/Slice/Grammar.y" +#line 1487 "src/Slice/Grammar.y" { unit->error("`;' missing after definition"); } @@ -3494,14 +3495,14 @@ yyreduce: case 131: /* Line 1792 of yacc.c */ -#line 1490 "src/Slice/Grammar.y" +#line 1491 "src/Slice/Grammar.y" { } break; case 133: /* Line 1792 of yacc.c */ -#line 1504 "src/Slice/Grammar.y" +#line 1505 "src/Slice/Grammar.y" { ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (3)])); ExceptionListTokPtr exceptionList = ExceptionListTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3512,7 +3513,7 @@ yyreduce: case 134: /* Line 1792 of yacc.c */ -#line 1511 "src/Slice/Grammar.y" +#line 1512 "src/Slice/Grammar.y" { ExceptionPtr exception = ExceptionPtr::dynamicCast((yyvsp[(1) - (1)])); ExceptionListTokPtr exceptionList = new ExceptionListTok; @@ -3523,7 +3524,7 @@ yyreduce: case 135: /* Line 1792 of yacc.c */ -#line 1523 "src/Slice/Grammar.y" +#line 1524 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainerPtr cont = unit->currentContainer(); @@ -3539,7 +3540,7 @@ yyreduce: case 136: /* Line 1792 of yacc.c */ -#line 1535 "src/Slice/Grammar.y" +#line 1536 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); unit->error("keyword `" + ident->v + "' cannot be used as exception name"); @@ -3549,7 +3550,7 @@ yyreduce: case 137: /* Line 1792 of yacc.c */ -#line 1546 "src/Slice/Grammar.y" +#line 1547 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); @@ -3562,7 +3563,7 @@ yyreduce: case 138: /* Line 1792 of yacc.c */ -#line 1555 "src/Slice/Grammar.y" +#line 1556 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (7)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(7) - (7)])); @@ -3576,7 +3577,7 @@ yyreduce: case 139: /* Line 1792 of yacc.c */ -#line 1570 "src/Slice/Grammar.y" +#line 1571 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); @@ -3591,7 +3592,7 @@ yyreduce: case 140: /* Line 1792 of yacc.c */ -#line 1581 "src/Slice/Grammar.y" +#line 1582 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (10)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(10) - (10)])); @@ -3607,7 +3608,7 @@ yyreduce: case 141: /* Line 1792 of yacc.c */ -#line 1598 "src/Slice/Grammar.y" +#line 1599 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -3615,7 +3616,7 @@ yyreduce: case 142: /* Line 1792 of yacc.c */ -#line 1602 "src/Slice/Grammar.y" +#line 1603 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); unit->error("keyword `" + ident->v + "' cannot be used as enumeration name"); @@ -3625,7 +3626,7 @@ yyreduce: case 143: /* Line 1792 of yacc.c */ -#line 1613 "src/Slice/Grammar.y" +#line 1614 "src/Slice/Grammar.y" { BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -3646,7 +3647,7 @@ yyreduce: case 144: /* Line 1792 of yacc.c */ -#line 1630 "src/Slice/Grammar.y" +#line 1631 "src/Slice/Grammar.y" { EnumPtr en = EnumPtr::dynamicCast((yyvsp[(3) - (6)])); if(en) @@ -3664,7 +3665,7 @@ yyreduce: case 145: /* Line 1792 of yacc.c */ -#line 1645 "src/Slice/Grammar.y" +#line 1646 "src/Slice/Grammar.y" { unit->error("missing enumeration name"); BoolTokPtr local = BoolTokPtr::dynamicCast((yyvsp[(1) - (2)])); @@ -3677,7 +3678,7 @@ yyreduce: case 146: /* Line 1792 of yacc.c */ -#line 1654 "src/Slice/Grammar.y" +#line 1655 "src/Slice/Grammar.y" { unit->popContainer(); (yyval) = (yyvsp[(2) - (6)]); @@ -3686,7 +3687,7 @@ yyreduce: case 147: /* Line 1792 of yacc.c */ -#line 1664 "src/Slice/Grammar.y" +#line 1665 "src/Slice/Grammar.y" { EnumeratorListTokPtr ens = EnumeratorListTokPtr::dynamicCast((yyvsp[(1) - (3)])); ens->v.splice(ens->v.end(), EnumeratorListTokPtr::dynamicCast((yyvsp[(3) - (3)]))->v); @@ -3696,14 +3697,14 @@ yyreduce: case 148: /* Line 1792 of yacc.c */ -#line 1670 "src/Slice/Grammar.y" +#line 1671 "src/Slice/Grammar.y" { } break; case 149: /* Line 1792 of yacc.c */ -#line 1678 "src/Slice/Grammar.y" +#line 1679 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); EnumeratorListTokPtr ens = new EnumeratorListTok; @@ -3719,7 +3720,7 @@ yyreduce: case 150: /* Line 1792 of yacc.c */ -#line 1690 "src/Slice/Grammar.y" +#line 1691 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (3)])); EnumeratorListTokPtr ens = new EnumeratorListTok; @@ -3743,7 +3744,7 @@ yyreduce: case 151: /* Line 1792 of yacc.c */ -#line 1710 "src/Slice/Grammar.y" +#line 1711 "src/Slice/Grammar.y" { StringTokPtr ident = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); unit->error("keyword `" + ident->v + "' cannot be used as enumerator"); @@ -3754,7 +3755,7 @@ yyreduce: case 152: /* Line 1792 of yacc.c */ -#line 1717 "src/Slice/Grammar.y" +#line 1718 "src/Slice/Grammar.y" { EnumeratorListTokPtr ens = new EnumeratorListTok; (yyval) = ens; // Dummy @@ -3763,7 +3764,7 @@ yyreduce: case 153: /* Line 1792 of yacc.c */ -#line 1727 "src/Slice/Grammar.y" +#line 1728 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); } @@ -3771,7 +3772,7 @@ yyreduce: case 154: /* Line 1792 of yacc.c */ -#line 1731 "src/Slice/Grammar.y" +#line 1732 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainedList cl = unit->currentContainer()->lookupContained(scoped->v); @@ -3809,7 +3810,7 @@ yyreduce: case 155: /* Line 1792 of yacc.c */ -#line 1770 "src/Slice/Grammar.y" +#line 1771 "src/Slice/Grammar.y" { BoolTokPtr out = new BoolTok; out->v = true; @@ -3819,7 +3820,7 @@ yyreduce: case 156: /* Line 1792 of yacc.c */ -#line 1776 "src/Slice/Grammar.y" +#line 1777 "src/Slice/Grammar.y" { BoolTokPtr out = new BoolTok; out->v = false; @@ -3829,14 +3830,14 @@ yyreduce: case 157: /* Line 1792 of yacc.c */ -#line 1787 "src/Slice/Grammar.y" +#line 1788 "src/Slice/Grammar.y" { } break; case 158: /* Line 1792 of yacc.c */ -#line 1790 "src/Slice/Grammar.y" +#line 1791 "src/Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3856,7 +3857,7 @@ yyreduce: case 159: /* Line 1792 of yacc.c */ -#line 1806 "src/Slice/Grammar.y" +#line 1807 "src/Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); OptionalDefTokPtr tsp = OptionalDefTokPtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3876,7 +3877,7 @@ yyreduce: case 160: /* Line 1792 of yacc.c */ -#line 1822 "src/Slice/Grammar.y" +#line 1823 "src/Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (4)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (4)])); @@ -3892,7 +3893,7 @@ yyreduce: case 161: /* Line 1792 of yacc.c */ -#line 1834 "src/Slice/Grammar.y" +#line 1835 "src/Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (6)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (6)])); @@ -3908,7 +3909,7 @@ yyreduce: case 162: /* Line 1792 of yacc.c */ -#line 1846 "src/Slice/Grammar.y" +#line 1847 "src/Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(1) - (3)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(3) - (3)])); @@ -3923,7 +3924,7 @@ yyreduce: case 163: /* Line 1792 of yacc.c */ -#line 1857 "src/Slice/Grammar.y" +#line 1858 "src/Slice/Grammar.y" { BoolTokPtr isOutParam = BoolTokPtr::dynamicCast((yyvsp[(3) - (5)])); TypePtr type = TypePtr::dynamicCast((yyvsp[(5) - (5)])); @@ -3938,7 +3939,7 @@ yyreduce: case 164: /* Line 1792 of yacc.c */ -#line 1873 "src/Slice/Grammar.y" +#line 1874 "src/Slice/Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); } @@ -3946,7 +3947,7 @@ yyreduce: case 165: /* Line 1792 of yacc.c */ -#line 1877 "src/Slice/Grammar.y" +#line 1878 "src/Slice/Grammar.y" { (yyval) = new ExceptionListTok; } @@ -3954,21 +3955,21 @@ yyreduce: case 166: /* Line 1792 of yacc.c */ -#line 1886 "src/Slice/Grammar.y" +#line 1887 "src/Slice/Grammar.y" { } break; case 167: /* Line 1792 of yacc.c */ -#line 1889 "src/Slice/Grammar.y" +#line 1890 "src/Slice/Grammar.y" { } break; case 168: /* Line 1792 of yacc.c */ -#line 1897 "src/Slice/Grammar.y" +#line 1898 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindByte); } @@ -3976,7 +3977,7 @@ yyreduce: case 169: /* Line 1792 of yacc.c */ -#line 1901 "src/Slice/Grammar.y" +#line 1902 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindBool); } @@ -3984,7 +3985,7 @@ yyreduce: case 170: /* Line 1792 of yacc.c */ -#line 1905 "src/Slice/Grammar.y" +#line 1906 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindShort); } @@ -3992,7 +3993,7 @@ yyreduce: case 171: /* Line 1792 of yacc.c */ -#line 1909 "src/Slice/Grammar.y" +#line 1910 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindInt); } @@ -4000,7 +4001,7 @@ yyreduce: case 172: /* Line 1792 of yacc.c */ -#line 1913 "src/Slice/Grammar.y" +#line 1914 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindLong); } @@ -4008,7 +4009,7 @@ yyreduce: case 173: /* Line 1792 of yacc.c */ -#line 1917 "src/Slice/Grammar.y" +#line 1918 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindFloat); } @@ -4016,7 +4017,7 @@ yyreduce: case 174: /* Line 1792 of yacc.c */ -#line 1921 "src/Slice/Grammar.y" +#line 1922 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindDouble); } @@ -4024,7 +4025,7 @@ yyreduce: case 175: /* Line 1792 of yacc.c */ -#line 1925 "src/Slice/Grammar.y" +#line 1926 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindString); } @@ -4032,7 +4033,7 @@ yyreduce: case 176: /* Line 1792 of yacc.c */ -#line 1929 "src/Slice/Grammar.y" +#line 1930 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindObject); } @@ -4040,7 +4041,7 @@ yyreduce: case 177: /* Line 1792 of yacc.c */ -#line 1933 "src/Slice/Grammar.y" +#line 1934 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindObjectProxy); } @@ -4048,7 +4049,7 @@ yyreduce: case 178: /* Line 1792 of yacc.c */ -#line 1937 "src/Slice/Grammar.y" +#line 1938 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindLocalObject); } @@ -4056,7 +4057,7 @@ yyreduce: case 179: /* Line 1792 of yacc.c */ -#line 1941 "src/Slice/Grammar.y" +#line 1942 "src/Slice/Grammar.y" { (yyval) = unit->builtin(Builtin::KindValue); } @@ -4064,7 +4065,7 @@ yyreduce: case 180: /* Line 1792 of yacc.c */ -#line 1945 "src/Slice/Grammar.y" +#line 1946 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ContainerPtr cont = unit->currentContainer(); @@ -4087,7 +4088,7 @@ yyreduce: case 181: /* Line 1792 of yacc.c */ -#line 1964 "src/Slice/Grammar.y" +#line 1965 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); ContainerPtr cont = unit->currentContainer(); @@ -4127,7 +4128,7 @@ yyreduce: case 182: /* Line 1792 of yacc.c */ -#line 2005 "src/Slice/Grammar.y" +#line 2006 "src/Slice/Grammar.y" { StringTokPtr str1 = StringTokPtr::dynamicCast((yyvsp[(1) - (2)])); StringTokPtr str2 = StringTokPtr::dynamicCast((yyvsp[(2) - (2)])); @@ -4137,14 +4138,14 @@ yyreduce: case 183: /* Line 1792 of yacc.c */ -#line 2011 "src/Slice/Grammar.y" +#line 2012 "src/Slice/Grammar.y" { } break; case 184: /* Line 1792 of yacc.c */ -#line 2019 "src/Slice/Grammar.y" +#line 2020 "src/Slice/Grammar.y" { StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(3) - (3)])); StringListTokPtr stringList = StringListTokPtr::dynamicCast((yyvsp[(1) - (3)])); @@ -4155,7 +4156,7 @@ yyreduce: case 185: /* Line 1792 of yacc.c */ -#line 2026 "src/Slice/Grammar.y" +#line 2027 "src/Slice/Grammar.y" { StringTokPtr str = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); StringListTokPtr stringList = new StringListTok; @@ -4166,7 +4167,7 @@ yyreduce: case 186: /* Line 1792 of yacc.c */ -#line 2038 "src/Slice/Grammar.y" +#line 2039 "src/Slice/Grammar.y" { BoolTokPtr local = new BoolTok; local->v = true; @@ -4176,7 +4177,7 @@ yyreduce: case 187: /* Line 1792 of yacc.c */ -#line 2044 "src/Slice/Grammar.y" +#line 2045 "src/Slice/Grammar.y" { BoolTokPtr local = new BoolTok; local->v = false; @@ -4186,7 +4187,7 @@ yyreduce: case 188: /* Line 1792 of yacc.c */ -#line 2055 "src/Slice/Grammar.y" +#line 2056 "src/Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindLong); IntegerTokPtr intVal = IntegerTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4203,7 +4204,7 @@ yyreduce: case 189: /* Line 1792 of yacc.c */ -#line 2068 "src/Slice/Grammar.y" +#line 2069 "src/Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindDouble); FloatingTokPtr floatVal = FloatingTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4220,7 +4221,7 @@ yyreduce: case 190: /* Line 1792 of yacc.c */ -#line 2081 "src/Slice/Grammar.y" +#line 2082 "src/Slice/Grammar.y" { StringTokPtr scoped = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); ConstDefTokPtr def = new ConstDefTok; @@ -4271,7 +4272,7 @@ yyreduce: case 191: /* Line 1792 of yacc.c */ -#line 2128 "src/Slice/Grammar.y" +#line 2129 "src/Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindString); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4286,7 +4287,7 @@ yyreduce: case 192: /* Line 1792 of yacc.c */ -#line 2139 "src/Slice/Grammar.y" +#line 2140 "src/Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4301,7 +4302,7 @@ yyreduce: case 193: /* Line 1792 of yacc.c */ -#line 2150 "src/Slice/Grammar.y" +#line 2151 "src/Slice/Grammar.y" { BuiltinPtr type = unit->builtin(Builtin::KindBool); StringTokPtr literal = StringTokPtr::dynamicCast((yyvsp[(1) - (1)])); @@ -4316,7 +4317,7 @@ yyreduce: case 194: /* Line 1792 of yacc.c */ -#line 2166 "src/Slice/Grammar.y" +#line 2167 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (6)])); TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (6)])); @@ -4329,7 +4330,7 @@ yyreduce: case 195: /* Line 1792 of yacc.c */ -#line 2175 "src/Slice/Grammar.y" +#line 2176 "src/Slice/Grammar.y" { StringListTokPtr metaData = StringListTokPtr::dynamicCast((yyvsp[(2) - (5)])); TypePtr const_type = TypePtr::dynamicCast((yyvsp[(3) - (5)])); @@ -4342,217 +4343,217 @@ yyreduce: case 196: /* Line 1792 of yacc.c */ -#line 2189 "src/Slice/Grammar.y" +#line 2190 "src/Slice/Grammar.y" { } break; case 197: /* Line 1792 of yacc.c */ -#line 2192 "src/Slice/Grammar.y" +#line 2193 "src/Slice/Grammar.y" { } break; case 198: /* Line 1792 of yacc.c */ -#line 2195 "src/Slice/Grammar.y" +#line 2196 "src/Slice/Grammar.y" { } break; case 199: /* Line 1792 of yacc.c */ -#line 2198 "src/Slice/Grammar.y" +#line 2199 "src/Slice/Grammar.y" { } break; case 200: /* Line 1792 of yacc.c */ -#line 2201 "src/Slice/Grammar.y" +#line 2202 "src/Slice/Grammar.y" { } break; case 201: /* Line 1792 of yacc.c */ -#line 2204 "src/Slice/Grammar.y" +#line 2205 "src/Slice/Grammar.y" { } break; case 202: /* Line 1792 of yacc.c */ -#line 2207 "src/Slice/Grammar.y" +#line 2208 "src/Slice/Grammar.y" { } break; case 203: /* Line 1792 of yacc.c */ -#line 2210 "src/Slice/Grammar.y" +#line 2211 "src/Slice/Grammar.y" { } break; case 204: /* Line 1792 of yacc.c */ -#line 2213 "src/Slice/Grammar.y" +#line 2214 "src/Slice/Grammar.y" { } break; case 205: /* Line 1792 of yacc.c */ -#line 2216 "src/Slice/Grammar.y" +#line 2217 "src/Slice/Grammar.y" { } break; case 206: /* Line 1792 of yacc.c */ -#line 2219 "src/Slice/Grammar.y" +#line 2220 "src/Slice/Grammar.y" { } break; case 207: /* Line 1792 of yacc.c */ -#line 2222 "src/Slice/Grammar.y" +#line 2223 "src/Slice/Grammar.y" { } break; case 208: /* Line 1792 of yacc.c */ -#line 2225 "src/Slice/Grammar.y" +#line 2226 "src/Slice/Grammar.y" { } break; case 209: /* Line 1792 of yacc.c */ -#line 2228 "src/Slice/Grammar.y" +#line 2229 "src/Slice/Grammar.y" { } break; case 210: /* Line 1792 of yacc.c */ -#line 2231 "src/Slice/Grammar.y" +#line 2232 "src/Slice/Grammar.y" { } break; case 211: /* Line 1792 of yacc.c */ -#line 2234 "src/Slice/Grammar.y" +#line 2235 "src/Slice/Grammar.y" { } break; case 212: /* Line 1792 of yacc.c */ -#line 2237 "src/Slice/Grammar.y" +#line 2238 "src/Slice/Grammar.y" { } break; case 213: /* Line 1792 of yacc.c */ -#line 2240 "src/Slice/Grammar.y" +#line 2241 "src/Slice/Grammar.y" { } break; case 214: /* Line 1792 of yacc.c */ -#line 2243 "src/Slice/Grammar.y" +#line 2244 "src/Slice/Grammar.y" { } break; case 215: /* Line 1792 of yacc.c */ -#line 2246 "src/Slice/Grammar.y" +#line 2247 "src/Slice/Grammar.y" { } break; case 216: /* Line 1792 of yacc.c */ -#line 2249 "src/Slice/Grammar.y" +#line 2250 "src/Slice/Grammar.y" { } break; case 217: /* Line 1792 of yacc.c */ -#line 2252 "src/Slice/Grammar.y" +#line 2253 "src/Slice/Grammar.y" { } break; case 218: /* Line 1792 of yacc.c */ -#line 2255 "src/Slice/Grammar.y" +#line 2256 "src/Slice/Grammar.y" { } break; case 219: /* Line 1792 of yacc.c */ -#line 2258 "src/Slice/Grammar.y" +#line 2259 "src/Slice/Grammar.y" { } break; case 220: /* Line 1792 of yacc.c */ -#line 2261 "src/Slice/Grammar.y" +#line 2262 "src/Slice/Grammar.y" { } break; case 221: /* Line 1792 of yacc.c */ -#line 2264 "src/Slice/Grammar.y" +#line 2265 "src/Slice/Grammar.y" { } break; case 222: /* Line 1792 of yacc.c */ -#line 2267 "src/Slice/Grammar.y" +#line 2268 "src/Slice/Grammar.y" { } break; case 223: /* Line 1792 of yacc.c */ -#line 2270 "src/Slice/Grammar.y" +#line 2271 "src/Slice/Grammar.y" { } break; case 224: /* Line 1792 of yacc.c */ -#line 2273 "src/Slice/Grammar.y" +#line 2274 "src/Slice/Grammar.y" { } break; case 225: /* Line 1792 of yacc.c */ -#line 2276 "src/Slice/Grammar.y" +#line 2277 "src/Slice/Grammar.y" { } break; /* Line 1792 of yacc.c */ -#line 4556 "src/Slice/Grammar.cpp" +#line 4557 "src/Slice/Grammar.cpp" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4784,5 +4785,5 @@ yyreturn: /* Line 2055 of yacc.c */ -#line 2280 "src/Slice/Grammar.y" +#line 2281 "src/Slice/Grammar.y" diff --git a/cpp/src/Slice/Grammar.h b/cpp/src/Slice/Grammar.h index cba1c7b404f..f5792b4498e 100644 --- a/cpp/src/Slice/Grammar.h +++ b/cpp/src/Slice/Grammar.h @@ -1,19 +1,19 @@ /* A Bison parser, made by GNU Bison 2.7. */ /* Bison interface for Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y index 7540526e42c..648186048ff 100644 --- a/cpp/src/Slice/Grammar.y +++ b/cpp/src/Slice/Grammar.y @@ -15,11 +15,12 @@ #include <cstring> #ifdef _MSC_VER -// I get these warnings from some bison versions: // warning C4102: 'yyoverflowlab' : unreferenced label -# pragma warning( disable : 4102 ) +# pragma warning(disable:4102) // warning C4065: switch statement contains 'default' but no 'case' labels -# pragma warning( disable : 4065 ) +# pragma warning(disable:4065) +// warning C4244: '=': conversion from 'int' to 'yytype_int16', possible loss of data +# pragma warning(disable:4244) #endif // diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 09bfc4bcdce..3c33c4b48e9 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -231,9 +231,9 @@ public: TypePtr returnType = p->returnType(); StringList metaData = getMetaData(p); - UnitPtr unit = p->unit(); + UnitPtr unt = p->unit(); string file = p->file(); - DefinitionContextPtr dc = unit->findDefinitionContext(p->file()); + DefinitionContextPtr dc = unt->findDefinitionContext(p->file()); if(!returnType) { @@ -284,8 +284,8 @@ public: const string file = p->file(); const string line = p->line(); - const UnitPtr unit = p->unit(); - const DefinitionContextPtr dc = unit->findDefinitionContext(file); + const UnitPtr unt = p->unit(); + const DefinitionContextPtr dc = unt->findDefinitionContext(file); for(StringList::const_iterator q = metaData.begin(); q != metaData.end(); ) { @@ -363,9 +363,9 @@ private: StringList metaData = cont->getMetaData(); StringList result; - UnitPtr unit = cont->container()->unit(); + UnitPtr unt = cont->container()->unit(); string file = cont->file(); - DefinitionContextPtr dc = unit->findDefinitionContext(file); + DefinitionContextPtr dc = unt->findDefinitionContext(file); assert(dc); for(StringList::const_iterator p = metaData.begin(); p != metaData.end(); ++p) @@ -452,8 +452,8 @@ private: StringList validateType(const SyntaxTreeBasePtr& p, const StringList& metaData, const string& file, const string& line) { - const UnitPtr unit = p->unit(); - const DefinitionContextPtr dc = unit->findDefinitionContext(file); + const UnitPtr unt = p->unit(); + const DefinitionContextPtr dc = unt->findDefinitionContext(file); assert(dc); StringList newMetaData; for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i) @@ -549,8 +549,8 @@ private: StringList validateGetSet(const SyntaxTreeBasePtr& p, const StringList& metaData, const string& file, const string& line) { - const UnitPtr unit = p->unit(); - const DefinitionContextPtr dc= unit->findDefinitionContext(file); + const UnitPtr unt = p->unit(); + const DefinitionContextPtr dc= unt->findDefinitionContext(file); assert(dc); StringList newMetaData; for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i) @@ -2192,7 +2192,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } } - string ignore; + string ignored; const size_t wireSize = elemType->minWireSize(); if(marshal) @@ -2220,8 +2220,8 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, writeSequenceMarshalUnmarshalCode(out, package, seq, s, marshal, iter, true, customStream, metaData); out << nl << stream << ".endSize(pos);"; } - else if(findMetaData("java:type:", metaData, ignore) || - findMetaData("java:type:", seq->getMetaData(), ignore)) + else if(findMetaData("java:type:", metaData, ignored) || + findMetaData("java:type:", seq->getMetaData(), ignored)) { // // The sequence is an instance of java.util.List<E>, where E is a fixed-size type. @@ -2247,8 +2247,8 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } writeSequenceMarshalUnmarshalCode(out, package, seq, tmpName, marshal, iter, true, customStream, metaData); } - else if(findMetaData("java:protobuf:", seq->getMetaData(), ignore) || - findMetaData("java:serializable:", seq->getMetaData(), ignore)) + else if(findMetaData("java:protobuf:", seq->getMetaData(), ignored) || + findMetaData("java:serializable:", seq->getMetaData(), ignored)) { // // This just writes a byte sequence. @@ -2309,8 +2309,8 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, } else if(wireSize > 1) { - if(findMetaData("java:type:", metaData, ignore) || - findMetaData("java:type:", seq->getMetaData(), ignore)) + if(findMetaData("java:type:", metaData, ignored) || + findMetaData("java:type:", seq->getMetaData(), ignored)) { // // The sequence is an instance of java.util.List<E>, where E is a fixed-size type. @@ -2318,8 +2318,8 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out, out << nl << stream << ".skipSize();"; } - else if(!findMetaData("java:protobuf:", seq->getMetaData(), ignore) && - !findMetaData("java:serializable:", seq->getMetaData(), ignore)) + else if(!findMetaData("java:protobuf:", seq->getMetaData(), ignored) && + !findMetaData("java:serializable:", seq->getMetaData(), ignored)) { out << nl << stream << ".skipSize();"; } @@ -3208,8 +3208,8 @@ Slice::JavaCompatGenerator::getSequenceTypes(const SequencePtr& seq, { string prefix = "java:buffer"; string meta; - string ignore; - if(seq->findMetaData(prefix, meta) || findMetaData(prefix, metaData, ignore)) + string ignored; + if(seq->findMetaData(prefix, meta) || findMetaData(prefix, metaData, ignored)) { instanceType = formalType = typeToBufferString(seq->type()); return true; @@ -4182,7 +4182,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, { if(optionalParam || mode == OptionalMember) { - string ignore; + string ignored; TypePtr elemType = seq->type(); BuiltinPtr eltBltin = BuiltinPtr::dynamicCast(elemType); if(!hasTypeMetaData(seq, metaData) && eltBltin && eltBltin->kind() < Builtin::KindObject) @@ -4199,7 +4199,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, return; } } - else if(findMetaData("java:serializable", seq->getMetaData(), ignore)) + else if(findMetaData("java:serializable", seq->getMetaData(), ignored)) { if(marshal) { @@ -4213,8 +4213,8 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, } } else if(!hasTypeMetaData(seq, metaData) || - findMetaData("java:type", seq->getMetaData(), ignore) || - findMetaData("java:type", metaData, ignore)) + findMetaData("java:type", seq->getMetaData(), ignored) || + findMetaData("java:type", metaData, ignored)) { string instanceType, formalType, origInstanceType, origFormalType; getSequenceTypes(seq, "", metaData, instanceType, formalType, false); @@ -4265,10 +4265,10 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out, string s = optionalParam && optionalMapping ? param + ".get()" : param; if(sz > 1) { - string ignore2; + string ignored2; out << nl << "final int optSize = " << s << " == null ? 0 : "; - if(findMetaData("java:buffer", seq->getMetaData(), ignore2) || - findMetaData("java:buffer", metaData, ignore2)) + if(findMetaData("java:buffer", seq->getMetaData(), ignored2) || + findMetaData("java:buffer", metaData, ignored2)) { out << s << ".remaining() / " << sz << ";"; } @@ -5112,8 +5112,8 @@ Slice::JavaGenerator::getSequenceTypes(const SequencePtr& seq, { string prefix = "java:buffer"; string meta; - string ignore; - if(seq->findMetaData(prefix, meta) || findMetaData(prefix, metaData, ignore)) + string ignored; + if(seq->findMetaData(prefix, meta) || findMetaData(prefix, metaData, ignored)) { instanceType = formalType = typeToBufferString(seq->type()); return true; diff --git a/cpp/src/Slice/PHPUtil.cpp b/cpp/src/Slice/PHPUtil.cpp index c47e9b00330..a2854f5a6e8 100644 --- a/cpp/src/Slice/PHPUtil.cpp +++ b/cpp/src/Slice/PHPUtil.cpp @@ -19,7 +19,12 @@ static string lowerCase(const string& s) { string result(s); +#ifdef ICE_CPP11_COMPILER + transform(result.begin(), result.end(), result.begin(), + [](char c){ return static_cast<char>(::tolower(static_cast<unsigned char>(c))); }); +#else transform(result.begin(), result.end(), result.begin(), ::tolower); +#endif return result; } diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 72c351ac9f8..fbe9ff6cf76 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -20,6 +20,11 @@ # include <io.h> #endif +// TODO: fix this warning once we no longer support VS2013 and earlier +#if defined(_MSC_VER) && (_MSC_VER >= 1900) +# pragma warning(disable:4589) // Constructor of abstract class 'Slice::Type' ignores initializer... +#endif + using namespace std; using namespace Slice; @@ -116,18 +121,18 @@ isMutableAfterReturnType(const TypePtr& type) } void -checkDeprecatedType(const UnitPtr& unit, const TypePtr& type) +checkDeprecatedType(const UnitPtr& unt, const TypePtr& type) { ClassDeclPtr decl = ClassDeclPtr::dynamicCast(type); if(decl && !decl->isLocal() && decl->isInterface()) { - unit->warning(Deprecated, "interface by value is deprecated"); + unt->warning(Deprecated, "interface by value is deprecated"); } ProxyPtr proxy = ProxyPtr::dynamicCast(type); if(proxy && !proxy->_class()->isInterface()) { - unit->warning(Deprecated, "proxy for a class is deprecated"); + unt->warning(Deprecated, "proxy for a class is deprecated"); } } @@ -364,13 +369,13 @@ Slice::SyntaxTreeBase::visit(ParserVisitor*, bool) { } -Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unit, const DefinitionContextPtr& definitionContext) : - _unit(unit), +Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unt, const DefinitionContextPtr& definitionContext) : + _unit(unt), _definitionContext(definitionContext) { if(!_definitionContext && _unit) { - _definitionContext = unit->currentDefinitionContext(); + _definitionContext = unt->currentDefinitionContext(); } } @@ -378,8 +383,8 @@ Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unit, const DefinitionConte // Type // ---------------------------------------------------------------------- -Slice::Type::Type(const UnitPtr& ut) : - SyntaxTreeBase(ut) +Slice::Type::Type(const UnitPtr& unt) : + SyntaxTreeBase(unt) { } diff --git a/cpp/src/Slice/Python.cpp b/cpp/src/Slice/Python.cpp index b84de7c0ec1..e9227772248 100644 --- a/cpp/src/Slice/Python.cpp +++ b/cpp/src/Slice/Python.cpp @@ -225,11 +225,11 @@ PackageVisitor::PackageVisitor(StringList& modules) : } void -PackageVisitor::createModules(const UnitPtr& unit, const string& module, const string& dir) +PackageVisitor::createModules(const UnitPtr& unt, const string& module, const string& dir) { StringList modules; PackageVisitor v(modules); - unit->visit(&v, false); + unt->visit(&v, false); for(StringList::iterator p = modules.begin(); p != modules.end(); ++p) { diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index c4b3f48726b..1e5d38037bf 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -459,7 +459,7 @@ Slice::Python::CodeVisitor::writeOperations(const ClassDefPtr& p) if((*oli)->hasMarshaledResult()) { string name = (*oli)->name(); - name[0] = toupper(static_cast<unsigned char>(name[0])); + name[0] = static_cast<char>(toupper(static_cast<unsigned char>(name[0]))); _out << sp; _out << nl << "\"\"\""; _out << nl << "Immediately marshals the result of an invocation of " << (*oli)->name() diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp index 2e2ab307d64..1bd05a10ea3 100644 --- a/cpp/src/Slice/Scanner.cpp +++ b/cpp/src/Slice/Scanner.cpp @@ -54,7 +54,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -71,7 +71,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -188,7 +188,7 @@ extern FILE *slice_in, *slice_out; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -245,7 +245,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -564,24 +564,19 @@ char *slice_text; #include <stdlib.h> #include <math.h> -#if defined(_MSC_VER) && defined(ICE_64) -// -// '=' : conversion from 'size_t' to 'int', possible loss of data -// The result of fread() is a size_t and gets inserted into an int -// -# pragma warning( 4 : 4267 ) -// +#if defined(_MSC_VER) +// '<' : signed/unsigned mismatch +# pragma warning(disable:4018) // 'initializing' : conversion from '__int64' to 'int', possible loss of data -// Puts a pointer-difference into an int -// -# pragma warning( 4 : 4244 ) -#endif +# pragma warning(disable:4244) -#if defined(_MSC_VER) && defined(ICE_32) +# if defined(ICE_64) // -// '<' : signed/unsigned mismatch +// '=' : conversion from 'size_t' to 'int', possible loss of data +// The result of fread() is a size_t and gets inserted into an int // -# pragma warning( 4 : 4018 ) +# pragma warning(disable:4267) +# endif #endif #if defined(__GNUC__) @@ -628,7 +623,7 @@ int checkIdentifier(string&); -#line 631 "src/Slice/Scanner.cpp" +#line 626 "src/Slice/Scanner.cpp" #define INITIAL 0 #define BOMSCAN 1 @@ -690,7 +685,7 @@ extern int slice_wrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -814,11 +809,11 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; + +#line 93 "src/Slice/Scanner.l" -#line 98 "src/Slice/Scanner.l" - -#line 821 "src/Slice/Scanner.cpp" +#line 816 "src/Slice/Scanner.cpp" if ( !(yy_init) ) { @@ -903,7 +898,7 @@ case 1: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up slice_text again */ YY_RULE_SETUP -#line 100 "src/Slice/Scanner.l" +#line 95 "src/Slice/Scanner.l" { if(unit->scanPosition(slice_text)) { @@ -917,7 +912,7 @@ case 2: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up slice_text again */ YY_RULE_SETUP -#line 107 "src/Slice/Scanner.l" +#line 102 "src/Slice/Scanner.l" { if(unit->scanPosition(slice_text)) { @@ -930,7 +925,7 @@ case 3: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up slice_text again */ YY_RULE_SETUP -#line 114 "src/Slice/Scanner.l" +#line 109 "src/Slice/Scanner.l" { if(unit->scanPosition(slice_text)) { @@ -944,7 +939,7 @@ case 4: (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up slice_text again */ YY_RULE_SETUP -#line 121 "src/Slice/Scanner.l" +#line 116 "src/Slice/Scanner.l" { if(unit->scanPosition(slice_text)) { @@ -954,7 +949,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 128 "src/Slice/Scanner.l" +#line 123 "src/Slice/Scanner.l" { // C++-style comment BEGIN(MAINSCAN); @@ -972,7 +967,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 143 "src/Slice/Scanner.l" +#line 138 "src/Slice/Scanner.l" { // C-style comment BEGIN(MAINSCAN); @@ -1016,7 +1011,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 184 "src/Slice/Scanner.l" +#line 179 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); return ICE_METADATA_OPEN; @@ -1024,7 +1019,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 189 "src/Slice/Scanner.l" +#line 184 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); return ICE_METADATA_CLOSE; @@ -1032,7 +1027,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 194 "src/Slice/Scanner.l" +#line 189 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); return ICE_GLOBAL_METADATA_OPEN; @@ -1040,7 +1035,7 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 199 "src/Slice/Scanner.l" +#line 194 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); return ICE_GLOBAL_METADATA_CLOSE; @@ -1049,7 +1044,7 @@ YY_RULE_SETUP case 11: /* rule 11 can match eol */ YY_RULE_SETUP -#line 204 "src/Slice/Scanner.l" +#line 199 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); StringTokPtr ident = new StringTok; @@ -1086,7 +1081,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 238 "src/Slice/Scanner.l" +#line 233 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); StringTokPtr ident = new StringTok; @@ -1097,7 +1092,7 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 246 "src/Slice/Scanner.l" +#line 241 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); StringTokPtr str = new StringTok; @@ -1303,7 +1298,7 @@ YY_RULE_SETUP YY_BREAK case 14: YY_RULE_SETUP -#line 449 "src/Slice/Scanner.l" +#line 444 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); IntegerTokPtr itp = new IntegerTok; @@ -1322,7 +1317,7 @@ YY_RULE_SETUP YY_BREAK case 15: YY_RULE_SETUP -#line 465 "src/Slice/Scanner.l" +#line 460 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); errno = 0; @@ -1356,7 +1351,7 @@ YY_RULE_SETUP case 16: /* rule 16 can match eol */ YY_RULE_SETUP -#line 495 "src/Slice/Scanner.l" +#line 490 "src/Slice/Scanner.l" { // Ignore white-space @@ -1372,7 +1367,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 508 "src/Slice/Scanner.l" +#line 503 "src/Slice/Scanner.l" { // Ignore UTF-8 BOM, rule only active when parsing start of file. @@ -1381,7 +1376,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 514 "src/Slice/Scanner.l" +#line 509 "src/Slice/Scanner.l" { BEGIN(MAINSCAN); if(slice_text[0] < 32 || slice_text[0] > 126) @@ -1400,10 +1395,10 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 530 "src/Slice/Scanner.l" +#line 525 "src/Slice/Scanner.l" ECHO; YY_BREAK -#line 1406 "src/Slice/Scanner.cpp" +#line 1401 "src/Slice/Scanner.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(BOMSCAN): case YY_STATE_EOF(MAINSCAN): @@ -1684,7 +1679,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); @@ -1739,7 +1734,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up slice_text */ @@ -1782,7 +1777,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1851,12 +1846,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void slice_restart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ slice_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1869,11 +1864,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void slice__switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * slice_pop_buffer_state(); @@ -1913,13 +1908,13 @@ static void slice__load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE slice__create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) slice_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in slice__create_buffer()" ); @@ -1942,11 +1937,11 @@ static void slice__load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with slice__create_buffer() - * + * */ void slice__delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1967,7 +1962,7 @@ static void slice__load_buffer_state (void) { int oerrno = errno; - + slice__flush_buffer(b ); b->yy_input_file = file; @@ -1983,13 +1978,13 @@ static void slice__load_buffer_state (void) } b->yy_is_interactive = 0; - + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void slice__flush_buffer (YY_BUFFER_STATE b ) { @@ -2018,7 +2013,7 @@ static void slice__load_buffer_state (void) * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void slice_push_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -2048,7 +2043,7 @@ void slice_push_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void slice_pop_buffer_state (void) { @@ -2072,7 +2067,7 @@ void slice_pop_buffer_state (void) static void slice_ensure_buffer_stack (void) { yy_size_t num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -2085,9 +2080,9 @@ static void slice_ensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in slice_ensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -2115,13 +2110,13 @@ static void slice_ensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE slice__scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -2150,14 +2145,14 @@ YY_BUFFER_STATE slice__scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to slice_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * slice__scan_bytes() instead. */ YY_BUFFER_STATE slice__scan_string (yyconst char * yystr ) { - + return slice__scan_bytes(yystr,strlen(yystr) ); } @@ -2165,7 +2160,7 @@ YY_BUFFER_STATE slice__scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE slice__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) @@ -2174,7 +2169,7 @@ YY_BUFFER_STATE slice__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_ char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) slice_alloc(n ); @@ -2228,16 +2223,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int slice_get_lineno (void) { - + return slice_lineno; } /** Get the input stream. - * + * */ FILE *slice_get_in (void) { @@ -2245,7 +2240,7 @@ FILE *slice_get_in (void) } /** Get the output stream. - * + * */ FILE *slice_get_out (void) { @@ -2253,7 +2248,7 @@ FILE *slice_get_out (void) } /** Get the length of the current token. - * + * */ yy_size_t slice_get_leng (void) { @@ -2261,7 +2256,7 @@ yy_size_t slice_get_leng (void) } /** Get the current token. - * + * */ char *slice_get_text (void) @@ -2271,18 +2266,18 @@ char *slice_get_text (void) /** Set the current line number. * @param line_number - * + * */ void slice_set_lineno (int line_number ) { - + slice_lineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see slice__switch_to_buffer */ void slice_set_in (FILE * in_str ) @@ -2336,7 +2331,7 @@ static int yy_init_globals (void) /* slice_lex_destroy is for both reentrant and non-reentrant scanners. */ int slice_lex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ slice__delete_buffer(YY_CURRENT_BUFFER ); @@ -2403,7 +2398,7 @@ void slice_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 530 "src/Slice/Scanner.l" +#line 525 "src/Slice/Scanner.l" diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index 04c62b7c089..645e1785f72 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -18,24 +18,19 @@ #include <stdlib.h> #include <math.h> -#if defined(_MSC_VER) && defined(ICE_64) -// -// '=' : conversion from 'size_t' to 'int', possible loss of data -// The result of fread() is a size_t and gets inserted into an int -// -# pragma warning( 4 : 4267 ) -// +#if defined(_MSC_VER) +// '<' : signed/unsigned mismatch +# pragma warning(disable:4018) // 'initializing' : conversion from '__int64' to 'int', possible loss of data -// Puts a pointer-difference into an int -// -# pragma warning( 4 : 4244 ) -#endif +# pragma warning(disable:4244) -#if defined(_MSC_VER) && defined(ICE_32) +# if defined(ICE_64) // -// '<' : signed/unsigned mismatch +// '=' : conversion from 'size_t' to 'int', possible loss of data +// The result of fread() is a size_t and gets inserted into an int // -# pragma warning( 4 : 4018 ) +# pragma warning(disable:4267) +# endif #endif #if defined(__GNUC__) diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp index 1e4195a814d..5d0a0e6fd68 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp +++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp @@ -853,14 +853,6 @@ IceServiceInstaller::removeSource(const string& source) const RegCloseKey(key); throw runtime_error("Error while searching EventLog with source '" + source + "': " + IceUtilInternal::errorToString(res)); } - - res = RegCloseKey(key); - if(res != ERROR_SUCCESS) - { - throw runtime_error("Could not close registry key handle: " + IceUtilInternal::errorToString(res)); - } - - return ""; // To keep compilers happy. } string diff --git a/cpp/src/slice2confluence/ConfluenceOutput.cpp b/cpp/src/slice2confluence/ConfluenceOutput.cpp index 900fcb164a8..405819e39b7 100644 --- a/cpp/src/slice2confluence/ConfluenceOutput.cpp +++ b/cpp/src/slice2confluence/ConfluenceOutput.cpp @@ -13,7 +13,12 @@ #include <sstream> #include <algorithm> -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +# pragma warning(disable:4100) // unreferenced parameter +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" # pragma clang diagnostic ignored "-Wshadow-all" # pragma clang diagnostic ignored "-Wunused-parameter" diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp index 0bf944121b9..c82994ec85b 100644 --- a/cpp/src/slice2confluence/Gen.cpp +++ b/cpp/src/slice2confluence/Gen.cpp @@ -27,7 +27,12 @@ #include <string> -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +# pragma warning(disable:4100) // unreferenced parameter +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" # pragma clang diagnostic ignored "-Wshadow-all" # pragma clang diagnostic ignored "-Wunused-parameter" diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index bd0a3b15b29..150ebdd11b5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -464,11 +464,11 @@ writeDocSummary(Output& out, const ContainedPtr& p) case Contained::ContainedTypeStruct: case Contained::ContainedTypeException: { - UnitPtr unit = p->container()->unit(); + UnitPtr unt = p->container()->unit(); string file = p->file(); assert(!file.empty()); static const string prefix = "cpp:doxygen:include:"; - DefinitionContextPtr dc = unit->findDefinitionContext(file); + DefinitionContextPtr dc = unt->findDefinitionContext(file); assert(dc); string q = dc->findMetaData(prefix); if(!q.empty()) @@ -5150,6 +5150,14 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) } } + H.zeroIndent(); + H << sp; + H << nl << "#if defined(_MSC_VER) && (_MSC_VER >= 1900)"; + H << nl << "# pragma warning(push)"; + H << nl << "# pragma warning(disable:4239)"; + H << nl << "#endif"; + H.restoreIndent(); + H << sp << nl << "class " << _dllExport << classNameAMD << '_' << name << " : public " << classScopedAMD << '_' << name << ", public ::IceInternal::IncomingAsync"; H << sb; @@ -5164,6 +5172,13 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) H << nl << "virtual void ice_response(" << params << ");"; H << eb << ';'; + H.zeroIndent(); + H << sp; + H << nl << "#if defined(_MSC_VER) && (_MSC_VER >= 1900)"; + H << nl << "# pragma warning(pop)"; + H << nl << "#endif"; + H.restoreIndent(); + C << sp; C << nl << "/// \\cond INTERNAL"; C << nl << "IceAsync" << classScopedAMD << '_' << name << "::" << classNameAMD << '_' << name diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp index cd3d5239b7c..6e1728a179d 100644 --- a/cpp/src/slice2cs/CsUtil.cpp +++ b/cpp/src/slice2cs/CsUtil.cpp @@ -1522,7 +1522,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } string func = typeS; - func[0] = toupper(static_cast<unsigned char>(typeS[0])); + func[0] = static_cast<char>(toupper(static_cast<unsigned char>(typeS[0]))); if(marshal) { if(isArray) @@ -2007,7 +2007,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out, case Builtin::KindString: { string func = typeS; - func[0] = toupper(static_cast<unsigned char>(typeS[0])); + func[0] = static_cast<char>(toupper(static_cast<unsigned char>(typeS[0]))); const bool isSerializable = seq->findMetaData("cs:serializable:", meta); if(marshal) diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 21eeb7553f6..0ac658ddf81 100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -25,7 +25,12 @@ #include <iterator> #include <string.h> -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +# pragma warning(disable:4100) // unreferenced parameter +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" # pragma clang diagnostic ignored "-Wshadow-all" # pragma clang diagnostic ignored "-Wunused-parameter" diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index e937de14f11..facca46c385 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -19,7 +19,11 @@ #include <limits> // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" @@ -176,7 +180,7 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package, abs = getUnqualified(c, package, "", "Disp"); } string name = op->name(); - name[0] = toupper(static_cast<unsigned char>(name[0])); + name[0] = static_cast<char>(toupper(static_cast<unsigned char>(name[0]))); return abs + "." + name + "MarshaledResult"; } else if(op->returnsMultipleValues()) @@ -185,7 +189,7 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package, assert(c); const string abs = getUnqualified(c, package); string name = op->name(); - name[0] = toupper(static_cast<unsigned char>(name[0])); + name[0] = static_cast<char>(toupper(static_cast<unsigned char>(name[0]))); return abs + "." + name + "Result"; } else @@ -230,7 +234,7 @@ void Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const string& package, const CommentPtr& dc) { string opName = op->name(); - opName[0] = toupper(static_cast<unsigned char>(opName[0])); + opName[0] = static_cast<char>(toupper(static_cast<unsigned char>(opName[0]))); out << sp << nl << "public static class " << opName << "Result"; out << sb; @@ -509,7 +513,7 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op const TypePtr ret = op->returnType(); const ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container()); assert(cl); - opName[0] = toupper(static_cast<unsigned char>(opName[0])); + opName[0] = static_cast<char>(toupper(static_cast<unsigned char>(opName[0]))); out << sp << nl << "public static class " << opName << "MarshaledResult implements " << getUnqualified("com.zeroc.Ice.MarshaledResult", package) << sb; @@ -1690,7 +1694,7 @@ Slice::JavaVisitor::writeDataMemberInitializers(Output& out, const DataMemberLis if((*p)->optional()) { string capName = (*p)->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '('; writeConstantValue(out, t, (*p)->defaultValueType(), (*p)->defaultValue(), package); out << ");"; @@ -2578,7 +2582,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) if((*d)->optional()) { string capName = paramName; - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '(' << paramName << ");"; } else @@ -3008,7 +3012,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) if((*d)->optional()) { string capName = paramName; - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '(' << paramName << ");"; } else @@ -3051,7 +3055,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) if((*d)->optional()) { string capName = paramName; - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '(' << paramName << ");"; } else @@ -3676,7 +3680,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p) if(getSet || optional) { string capName = p->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); // // If container is a class, get all of its operations so that we can check for conflicts. diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp index 8c69fdd574f..2c9b4bf94e9 100644 --- a/cpp/src/slice2java/GenCompat.cpp +++ b/cpp/src/slice2java/GenCompat.cpp @@ -19,7 +19,11 @@ #include <limits> // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" @@ -1038,7 +1042,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const } string capName = (*d)->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); if(b) { @@ -1871,7 +1875,7 @@ Slice::JavaCompatVisitor::writeDataMemberInitializers(Output& out, const DataMem if((*p)->optional()) { string capName = (*p)->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '('; writeConstantValue(out, t, (*p)->defaultValueType(), (*p)->defaultValue(), package); out << ");"; @@ -3027,7 +3031,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) if((*d)->optional()) { string capName = paramName; - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '(' << paramName << ");"; } else @@ -3371,7 +3375,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) if((*d)->optional()) { string capName = paramName; - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '(' << paramName << ");"; } else @@ -3413,7 +3417,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) if((*d)->optional()) { string capName = paramName; - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); out << nl << "set" << capName << '(' << paramName << ");"; } else @@ -3976,7 +3980,7 @@ Slice::GenCompat::TypesVisitor::visitDataMember(const DataMemberPtr& p) if(getSet || optional) { string capName = p->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); // // If container is a class, get all of its operations so that we can check for conflicts. diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index 82aa7646157..48f6c8916ba 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -24,7 +24,11 @@ using namespace Slice; using namespace IceUtilInternal; // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp index 7b050e80a12..c3cc7810599 100644 --- a/cpp/src/slice2js/Gen.cpp +++ b/cpp/src/slice2js/Gen.cpp @@ -18,7 +18,11 @@ #include <Slice/Util.h> // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp index 607c7bc9339..c1f6e6912fe 100644 --- a/cpp/src/slice2js/JsUtil.cpp +++ b/cpp/src/slice2js/JsUtil.cpp @@ -24,7 +24,11 @@ #endif // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" diff --git a/cpp/src/slice2matlab/Main.cpp b/cpp/src/slice2matlab/Main.cpp index c1af189ccd0..580e4ab60d1 100644 --- a/cpp/src/slice2matlab/Main.cpp +++ b/cpp/src/slice2matlab/Main.cpp @@ -39,7 +39,11 @@ using namespace Slice; using namespace IceUtilInternal; // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index d753073e370..27bb357cd75 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -29,7 +29,11 @@ using namespace Slice; using namespace IceUtilInternal; // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" @@ -2024,7 +2028,7 @@ Slice::Gen::TypesVisitor::writeOptionalDataMemberSelectors(const DataMemberList& string paramName = getParamName(*q, true); string capName = (*q)->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); _H << nl << "-(void)set" << capName << ":(" << typeString << ")" << name << ";"; diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp index 47bfb1d37b3..1cbe7314c3b 100644 --- a/cpp/src/slice2objc/ObjCUtil.cpp +++ b/cpp/src/slice2objc/ObjCUtil.cpp @@ -241,7 +241,7 @@ Slice::ObjCGenerator::getFactoryMethod(const ContainedPtr& p, bool deprecated) } else if(deprecated || name.size() < 2 || !isupper(*(name.begin() + 1))) { - *name.begin() = tolower(*name.begin()); + *name.begin() = static_cast<char>(tolower(*name.begin())); } else { @@ -251,7 +251,7 @@ Slice::ObjCGenerator::getFactoryMethod(const ContainedPtr& p, bool deprecated) { break; } - *q = tolower(*q); + *q = static_cast<char>(tolower(*q)); } } return name; diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index c0ccdd26fd8..ceea76d16ab 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -35,7 +35,11 @@ #endif // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" |