diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-03-05 15:20:12 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-03-05 15:20:12 +0100 |
commit | 279cc589ece5abaeb735974e799c809227e0aa83 (patch) | |
tree | 186204caab0ce3d9cf39a5f09736e6b750e95b67 /cpp | |
parent | Fixed copy/paste error for reading replica cert CN property (diff) | |
download | ice-279cc589ece5abaeb735974e799c809227e0aa83.tar.bz2 ice-279cc589ece5abaeb735974e799c809227e0aa83.tar.xz ice-279cc589ece5abaeb735974e799c809227e0aa83.zip |
ICE-4793 - Fixes to prevent GCC shadow warnings and other minor fixes
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/Freeze/Map.h | 22 | ||||
-rw-r--r-- | cpp/include/Ice/Direct.h | 2 | ||||
-rw-r--r-- | cpp/include/Ice/IncomingAsync.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Direct.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/DynamicLibrary.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/IncomingAsync.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Network.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 22 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 36 | ||||
-rw-r--r-- | cpp/src/slice2cs/Gen.cpp | 6 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 10 |
12 files changed, 60 insertions, 60 deletions
diff --git a/cpp/include/Freeze/Map.h b/cpp/include/Freeze/Map.h index 348a2de161b..fa5d75ac92d 100644 --- a/cpp/include/Freeze/Map.h +++ b/cpp/include/Freeze/Map.h @@ -649,14 +649,14 @@ template<typename key_type, typename KeyCodec, typename Compare> class KeyCompare : public KeyCompareBase { public: - KeyCompare(const Compare& compare, + KeyCompare(const Compare& mapCompare, const Ice::CommunicatorPtr& communicator) : #if defined(_MSC_VER) && (_MSC_VER < 1300) - KeyCompareBase(enableKeyCompare(compare)), + KeyCompareBase(enableKeyCompare(mapCompare)), #else KeyCompareBase(true), #endif - _compare(compare), + _compare(mapCompare), _communicator(communicator) {} @@ -736,13 +736,13 @@ public: } protected: - MapIndex(const std::string& name, const Compare& compare) : + MapIndex(const std::string& mapName, const Compare& mapCompare) : #if defined(_MSC_VER) && (_MSC_VER < 1300) - MapIndexBase(name, enableKeyCompare(compare)), + MapIndexBase(mapName, enableKeyCompare(mapCompare)), #else - MapIndexBase(name, true), + MapIndexBase(mapName, true), #endif - _compare(compare) + _compare(mapCompare) {} private: @@ -765,8 +765,8 @@ public: } protected: - MapIndex(const std::string& name, const IceEncodingCompare&): - MapIndexBase(name, false) + MapIndex(const std::string& mapName, const IceEncodingCompare&): + MapIndexBase(mapName, false) {} }; #endif @@ -1179,8 +1179,8 @@ public: protected: - Map(const Ice::CommunicatorPtr& communicator) : - _communicator(communicator) + Map(const Ice::CommunicatorPtr& mapCommunicator) : + _communicator(mapCommunicator) { } diff --git a/cpp/include/Ice/Direct.h b/cpp/include/Ice/Direct.h index 995158061a4..ca869b47f9c 100644 --- a/cpp/include/Ice/Direct.h +++ b/cpp/include/Ice/Direct.h @@ -28,7 +28,7 @@ public: Direct(const Ice::Current&); void destroy(); - const Ice::ObjectPtr& servant(); + const Ice::ObjectPtr& getServant(); virtual bool isCollocated(); virtual const Ice::Current& getCurrent(); diff --git a/cpp/include/Ice/IncomingAsync.h b/cpp/include/Ice/IncomingAsync.h index d283bae9cca..67a7976b08f 100644 --- a/cpp/include/Ice/IncomingAsync.h +++ b/cpp/include/Ice/IncomingAsync.h @@ -53,7 +53,7 @@ protected: bool __validateResponse(bool); // Inlined for speed optimization. - BasicStream* __os() { return &_os; } + BasicStream* __getOs() { return &_os; } private: diff --git a/cpp/src/Ice/Direct.cpp b/cpp/src/Ice/Direct.cpp index b701b5aa26c..632f09213cd 100644 --- a/cpp/src/Ice/Direct.cpp +++ b/cpp/src/Ice/Direct.cpp @@ -142,7 +142,7 @@ IceInternal::Direct::destroy() } const ObjectPtr& -IceInternal::Direct::servant() +IceInternal::Direct::getServant() { return _servant; } diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index 314fc71f9ff..1c7fe2f79e3 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -23,8 +23,8 @@ IceUtil::Shared* IceInternal::upCast(DynamicLibrary* p) { return p; } IceUtil::Shared* IceInternal::upCast(DynamicLibraryList* p) { return p; } IceInternal::DynamicLibrary::DynamicLibrary(const Ice::StringConverterPtr& stringConverter) : - _stringConverter(stringConverter), - _hnd(0) + _hnd(0), + _stringConverter(stringConverter) { } diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp index 91c0580e2fb..38df435abe1 100644 --- a/cpp/src/Ice/IncomingAsync.cpp +++ b/cpp/src/Ice/IncomingAsync.cpp @@ -312,7 +312,7 @@ IceAsync::Ice::AMD_Object_ice_invoke::ice_response(bool ok, const vector<Byte>& { try { - __os()->writeBlob(outParams); + __getOs()->writeBlob(outParams); } catch(const LocalException& ex) { @@ -330,7 +330,7 @@ IceAsync::Ice::AMD_Object_ice_invoke::ice_response(bool ok, const pair<const Byt { try { - __os()->writeBlob(outParams.first, static_cast<Int>(outParams.second - outParams.first)); + __getOs()->writeBlob(outParams.first, static_cast<Int>(outParams.second - outParams.first)); } catch(const LocalException& ex) { diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h index ca764aadf7e..370401e5211 100644 --- a/cpp/src/Ice/Network.h +++ b/cpp/src/Ice/Network.h @@ -108,7 +108,7 @@ class ICE_API NativeInfo : virtual public IceUtil::Shared { public: - NativeInfo(SOCKET fd = INVALID_SOCKET) : _fd(fd) + NativeInfo(SOCKET socketFd = INVALID_SOCKET) : _fd(socketFd) { } diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index cd4bd599a35..8bddf2d9f60 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -1708,7 +1708,7 @@ IceDelegateD::Ice::Object::ice_isA(const string& __id, const Context* context) try { - __direct.servant()->__collocDispatch(__direct); + __direct.getServant()->__collocDispatch(__direct); } catch(const ::std::exception& __ex) { @@ -1766,7 +1766,7 @@ IceDelegateD::Ice::Object::ice_ping(const ::Ice::Context* context) try { - __direct.servant()->__collocDispatch(__direct); + __direct.getServant()->__collocDispatch(__direct); } catch(const ::std::exception& __ex) { @@ -1829,7 +1829,7 @@ IceDelegateD::Ice::Object::ice_ids(const ::Ice::Context* context) try { - __direct.servant()->__collocDispatch(__direct); + __direct.getServant()->__collocDispatch(__direct); } catch(const ::std::exception& __ex) { @@ -1893,7 +1893,7 @@ IceDelegateD::Ice::Object::ice_id(const ::Ice::Context* context) try { - __direct.servant()->__collocDispatch(__direct); + __direct.getServant()->__collocDispatch(__direct); } catch(const ::std::exception& __ex) { diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 0d5024d9d91..fe0f9aa7d23 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -576,11 +576,9 @@ Slice::fixKwd(const string& name) } void -Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& param, bool marshal, +Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& fixedParam, bool marshal, const string& str, bool pointer, const StringList& metaData, int typeCtx) { - string fixedParam = fixKwd(param); - string stream; if(str.empty()) { @@ -686,7 +684,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& if(marshal) { - string seqType = findMetaData(metaData, typeCtx); + string seqType = findMetaData(metaData, typeCtx); string scope = fixKwd(seq->scope()); if(seqType == "array" || seqType == "range:array") @@ -751,7 +749,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& << fixedParam << ".first; ___" << fixedParam << " != " << fixedParam << ".second; ++___" << fixedParam << ")"; out << sb; - writeMarshalUnmarshalCode(out, seq->type(), "(*___" + fixedParam + ")", true, "", true, l, false); + writeMarshalUnmarshalCode(out, seq->type(), "(*___" + fixedParam + ")", true, "", true, l); out << eb; } else if(!seqType.empty()) @@ -810,7 +808,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& } else { - string seqType = findMetaData(metaData, typeCtx); + string seqType = findMetaData(metaData, typeCtx); string scope = fixKwd(seq->scope()); if(seqType == "array" || seqType == "range:array") { @@ -832,7 +830,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& StringList l; l.push_back("cpp:type:" + seqType); out << nl << seqType << " ___" << fixedParam << ";"; - writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, l, false); + writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, l); } } else if(builtin->kind() == Builtin::KindByte) @@ -896,11 +894,11 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& } if(typeCtx & TypeContextAMIPrivateEnd) { - writeMarshalUnmarshalCode(out, seq, fixedParam, false, "", true, md, false); + writeMarshalUnmarshalCode(out, seq, fixedParam, false, "", true, md); } else { - writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, md, false); + writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, md); out << nl << fixedParam << ".first = ___" << fixedParam << ".begin();"; out << nl << fixedParam << ".second = ___" << fixedParam << ".end();"; } @@ -1005,7 +1003,7 @@ Slice::writeMarshalCode(Output& out, const ParamDeclList& params, const TypePtr& } if(ret) { - writeMarshalUnmarshalCode(out, ret, "__ret", true, "", true, metaData, false); + writeMarshalUnmarshalCode(out, ret, "__ret", true, "", true, metaData); } } @@ -1015,7 +1013,7 @@ Slice::writeUnmarshalCode(Output& out, const ParamDeclList& params, const TypePt { for(ParamDeclList::const_iterator p = params.begin(); p != params.end(); ++p) { - writeMarshalUnmarshalCode(out, (*p)->type(), fixKwd((*p)->name()), false, "", true, (*p)->getMetaData(), + writeMarshalUnmarshalCode(out, (*p)->type(), fixKwd((*p)->name()), false, "", true, (*p)->getMetaData(), typeCtx); } if(ret) @@ -1236,7 +1234,7 @@ Slice::writeEndCode(Output& out, const ParamDeclList& params, const TypePtr& ret } if(ret) { - writeParamEndCode(out, ret, "__ret", metaData); + writeParamEndCode(out, ret, "__ret", metaData); } } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 1a1337e5922..ba1c7c42c43 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2481,15 +2481,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) paramsAMI.push_back(typeString); paramsDeclAMI.push_back(typeString + ' ' + paramName); argsAMI.push_back(paramName); - inParams.push_back(*q); + inParams.push_back(*q); } - else - { + else + { outParamsAMI.push_back(typeString); - outParamsDeclAMI.push_back(typeString + ' ' + paramName); - outParamsDeclEndAMI.push_back(typeStringEndAMI + ' ' + paramName); - outParams.push_back(*q); - } + outParamsDeclAMI.push_back(typeString + ' ' + paramName); + outParamsDeclEndAMI.push_back(typeStringEndAMI + ' ' + paramName); + outParams.push_back(*q); + } } // @@ -2657,10 +2657,10 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << sb; C << nl << "__result->__prepare(" << flatName << ", " << operationModeToString(p->sendMode()) << ", __ctx);"; C << nl << "::IceInternal::BasicStream* __os = __result->__getOs();"; - writeMarshalCode(C, inParams, 0, StringList(), true); + writeMarshalCode(C, inParams, 0, StringList(), TypeContextInParam); if(p->sendsClasses()) { - C << nl << "__os->writePendingObjects();"; + C << nl << "__os->writePendingObjects();"; } C << nl << "__os->endWriteEncaps();"; C << nl << "__result->__send(true);"; @@ -3211,7 +3211,7 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) C << nl << "try"; C << sb; C << nl << "::IceInternal::BasicStream* __os = __og.os();"; - writeMarshalCode(C, inParams, 0, StringList(), true); + writeMarshalCode(C, inParams, 0, StringList(), TypeContextInParam); if(p->sendsClasses()) { C << nl << "__os->writePendingObjects();"; @@ -3444,6 +3444,7 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) vector<string> params; vector<string> paramsDecl; + vector<string> directParamsDecl; vector<string> args; vector<string> argMembers; @@ -3473,6 +3474,7 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) params.push_back(typeString); paramsDecl.push_back(typeString + ' ' + paramName); + directParamsDecl.push_back(typeString + " __p_" + paramName); args.push_back(paramName); argMembers.push_back("_m_" + paramName); } @@ -3520,7 +3522,7 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) string resultRef = outputTypeToString(ret, p->getMetaData(), _useWstring); C << resultRef + " __result"; } - C << paramsDecl << "const ::Ice::Current& __current" << epar << " : "; + C << directParamsDecl << "const ::Ice::Current& __current" << epar << " : "; C.inc(); C << nl << "::IceInternal::Direct(__current)"; @@ -3533,7 +3535,7 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) { if(args[i] != "__current") { - C << "," << nl << argMembers[i] + "(" + args[i] + ")"; + C << "," << nl << argMembers[i] + "(__p_" + args[i] + ")"; } } C.dec(); @@ -3629,7 +3631,7 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) C << nl << "try"; C << sb; - C << nl << "__direct.servant()->__collocDispatch(__direct);"; + C << nl << "__direct.getServant()->__collocDispatch(__direct);"; C << eb; #if 0 C << nl << "catch(const ::std::exception& __ex)"; @@ -6584,11 +6586,11 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) { C << nl << "try"; C << sb; - C << nl << "::IceInternal::BasicStream* __os = this->__os();"; - writeMarshalCode(C, outParams, 0, StringList(), true); + C << nl << "::IceInternal::BasicStream* __os = this->__getOs();"; + writeMarshalCode(C, outParams, 0, StringList(), TypeContextInParam); if(ret) { - writeMarshalUnmarshalCode(C, ret, "__ret", true, "", true, p->getMetaData(), true); + writeMarshalUnmarshalCode(C, ret, "__ret", true, "", true, p->getMetaData(), TypeContextInParam); } if(p->returnsClasses()) { @@ -6623,7 +6625,7 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) C << sb; C << nl <<"if(__validateResponse(false))"; C << sb; - C << nl << "__os()->write(*__ex);"; + C << nl << "__getOs()->write(*__ex);"; C << nl << "__response(false);"; C << eb; C << eb; diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index ee3beb3d7df..0ea6ceda5db 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -5810,7 +5810,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "try"; _out << sb; - _out << nl << "Ice.DispatchStatus status__ = direct__.servant().collocDispatch__(direct__);"; + _out << nl << "Ice.DispatchStatus status__ = direct__.getServant().collocDispatch__(direct__);"; if(!throws.empty()) { _out << nl << "if(status__ == Ice.DispatchStatus.DispatchUserException)"; @@ -6105,7 +6105,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) { _out << nl << "try"; _out << sb; - _out << nl << "IceInternal.BasicStream os__ = this.os__();"; + _out << nl << "IceInternal.BasicStream os__ = this.getOs__();"; for(q = outParams.begin(); q != outParams.end(); ++q) { string typeS = typeToString(q->first); @@ -6146,7 +6146,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) _out << sb; _out << nl << "if(validateResponse__(false))"; _out << sb; - _out << nl << "os__().writeUserException(ex__);"; + _out << nl << "getOs__().writeUserException(ex__);"; _out << nl << "response__(false);"; _out << eb; _out << eb; diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 76c5ea40c99..906d8aaca90 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -4088,7 +4088,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << sb; out << nl << "__result.__prepare(__" << op->name() << "_name, " << sliceModeToIceMode(op->sendMode()) << ", __ctx, __explicitCtx);"; - out << nl << "IceInternal.BasicStream __os = __result.__os();"; + out << nl << "IceInternal.BasicStream __os = __result.__getOs();"; iter = 0; for(pli = paramList.begin(); pli != paramList.end(); ++pli) { @@ -4171,7 +4171,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) } } - out << nl << "IceInternal.BasicStream __is = __result.__is();"; + out << nl << "IceInternal.BasicStream __is = __result.__getIs();"; if(ret || !outParams.empty()) { out << nl << "__is.startReadEncaps();"; @@ -5372,7 +5372,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "try"; out << sb; - out << sp << nl << "Ice.DispatchStatus __status = __direct.servant().__collocDispatch(__direct);"; + out << sp << nl << "Ice.DispatchStatus __status = __direct.getServant().__collocDispatch(__direct);"; out << nl << "if(__status == Ice.DispatchStatus.DispatchUserException)"; out << sb; out << nl << "__direct.throwUserException();"; @@ -6147,7 +6147,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) { out << nl << "try"; out << sb; - out << nl << "IceInternal.BasicStream __os = this.__os();"; + out << nl << "IceInternal.BasicStream __os = this.__getOs();"; for(pli = outParams.begin(); pli != outParams.end(); ++pli) { StringList metaData = (*pli)->getMetaData(); @@ -6190,7 +6190,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) out << sb; out << nl << "if(__validateResponse(false))"; out << sb; - out << nl << "__os().writeUserException(__ex);"; + out << nl << "__getOs().writeUserException(__ex);"; out << nl << "__response(false);"; out << eb; out << eb; |