Author: shuston
Date: Thu Oct 30 16:13:37 2008
New Revision: 709282
URL: http://svn.apache.org/viewvc?rev=709282&view=rev
Log:
Resolved unused argument warnings from MSVC
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp?rev=709282&r1=709281&r2=709282&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp Thu Oct 30
16:13:37 2008
@@ -160,7 +160,7 @@
{
try {
mgr.remove(xid);
- } catch (ConnectionException& e) {
+ } catch (ConnectionException& /*e*/) {
//assume it was explicitly cleaned up after a call to prepare, commit
or rollback
}
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp?rev=709282&r1=709281&r2=709282&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
(original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp Thu
Oct 30 16:13:37 2008
@@ -113,7 +113,7 @@
if (exchange) {
exchange->bind(queue, queue->getName(), 0);
}
- } catch (const framing::NotFoundException& e) {
+ } catch (const framing::NotFoundException& /*e*/) {
//assume no default exchange has been declared
}
return RecoverableQueue::shared_ptr(new RecoverableQueueImpl(queue));
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp?rev=709282&r1=709281&r2=709282&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp Thu Oct 30
16:13:37 2008
@@ -66,11 +66,11 @@
AclModule* acl = getBroker().getAcl();
if (acl) {
std::map<acl::Property, std::string> params;
- params.insert(make_pair(acl::TYPE, type));
- params.insert(make_pair(acl::ALTERNATE, alternateExchange));
- params.insert(make_pair(acl::PASSIVE, std::string(passive ? "true" :
"false") ));
- params.insert(make_pair(acl::DURABLE, std::string(durable ? "true" :
"false")));
- if
(!acl->authorise(getConnection().getUserId(),acl::CREATE,acl::EXCHANGE,exchange,¶ms)
)
+ params.insert(make_pair(acl::PROP_TYPE, type));
+ params.insert(make_pair(acl::PROP_ALTERNATE, alternateExchange));
+ params.insert(make_pair(acl::PROP_PASSIVE, std::string(passive ?
"true" : "false") ));
+ params.insert(make_pair(acl::PROP_DURABLE, std::string(durable ?
"true" : "false")));
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_CREATE,acl::OBJ_EXCHANGE,exchange,¶ms)
)
throw NotAllowedException("ACL denied exhange declare request");
}
@@ -105,7 +105,7 @@
alternateExchange, durable, false, args,
response.second ?
"created" : "existing"));
- }catch(UnknownExchangeTypeException& e){
+ }catch(UnknownExchangeTypeException& /*e*/){
throw CommandInvalidException(QPID_MSG("Exchange type not
implemented: " << type));
}
}
@@ -130,7 +130,7 @@
{
AclModule* acl = getBroker().getAcl();
if (acl) {
- if
(!acl->authorise(getConnection().getUserId(),acl::DELETE,acl::EXCHANGE,name,NULL)
)
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_DELETE,acl::OBJ_EXCHANGE,name,NULL)
)
throw NotAllowedException("ACL denied exhange delete request");
}
@@ -150,14 +150,14 @@
{
AclModule* acl = getBroker().getAcl();
if (acl) {
- if
(!acl->authorise(getConnection().getUserId(),acl::ACCESS,acl::EXCHANGE,name,NULL)
)
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_ACCESS,acl::OBJ_EXCHANGE,name,NULL)
)
throw NotAllowedException("ACL denied exhange query request");
}
try {
Exchange::shared_ptr exchange(getBroker().getExchanges().get(name));
return ExchangeQueryResult(exchange->getType(), exchange->isDurable(),
false, exchange->getArgs());
- } catch (const NotFoundException& e) {
+ } catch (const NotFoundException& /*e*/) {
return ExchangeQueryResult("", false, true, FieldTable());
}
}
@@ -168,7 +168,7 @@
{
AclModule* acl = getBroker().getAcl();
if (acl) {
- if
(!acl->authorise(getConnection().getUserId(),acl::BIND,acl::EXCHANGE,exchangeName,routingKey)
)
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_BIND,acl::OBJ_EXCHANGE,exchangeName,routingKey)
)
throw NotAllowedException("ACL denied exhange bind request");
}
@@ -198,9 +198,9 @@
AclModule* acl = getBroker().getAcl();
if (acl) {
std::map<acl::Property, std::string> params;
- params.insert(make_pair(acl::QUEUENAME, queueName));
- params.insert(make_pair(acl::ROUTINGKEY, routingKey));
- if
(!acl->authorise(getConnection().getUserId(),acl::UNBIND,acl::EXCHANGE,exchangeName,¶ms)
)
+ params.insert(make_pair(acl::PROP_QUEUENAME, queueName));
+ params.insert(make_pair(acl::PROP_ROUTINGKEY, routingKey));
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_UNBIND,acl::OBJ_EXCHANGE,exchangeName,¶ms)
)
throw NotAllowedException("ACL denied exchange unbind request");
}
@@ -229,9 +229,9 @@
AclModule* acl = getBroker().getAcl();
if (acl) {
std::map<acl::Property, std::string> params;
- params.insert(make_pair(acl::QUEUENAME, queueName));
- params.insert(make_pair(acl::ROUTINGKEY, key));
- if
(!acl->authorise(getConnection().getUserId(),acl::CREATE,acl::EXCHANGE,exchangeName,¶ms)
)
+ params.insert(make_pair(acl::PROP_QUEUENAME, queueName));
+ params.insert(make_pair(acl::PROP_ROUTINGKEY, key));
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_CREATE,acl::OBJ_EXCHANGE,exchangeName,¶ms)
)
throw NotAllowedException("ACL denied exhange bound request");
}
@@ -297,7 +297,7 @@
{
AclModule* acl = getBroker().getAcl();
if (acl) {
- if
(!acl->authorise(getConnection().getUserId(),acl::ACCESS,acl::QUEUE,name,NULL) )
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_ACCESS,acl::OBJ_QUEUE,name,NULL)
)
throw NotAllowedException("ACL denied queue query request");
}
@@ -326,12 +326,12 @@
AclModule* acl = getBroker().getAcl();
if (acl) {
std::map<acl::Property, std::string> params;
- params.insert(make_pair(acl::ALTERNATE, alternateExchange));
- params.insert(make_pair(acl::PASSIVE, std::string(passive ? "true" :
"false") ));
- params.insert(make_pair(acl::DURABLE, std::string(durable ? "true" :
"false")));
- params.insert(make_pair(acl::EXCLUSIVE, std::string(exclusive ? "true"
: "false")));
- params.insert(make_pair(acl::AUTODELETE, std::string(autoDelete ?
"true" : "false")));
- if
(!acl->authorise(getConnection().getUserId(),acl::CREATE,acl::QUEUE,name,¶ms)
)
+ params.insert(make_pair(acl::PROP_ALTERNATE, alternateExchange));
+ params.insert(make_pair(acl::PROP_PASSIVE, std::string(passive ?
"true" : "false") ));
+ params.insert(make_pair(acl::PROP_DURABLE, std::string(durable ?
"true" : "false")));
+ params.insert(make_pair(acl::PROP_EXCLUSIVE, std::string(exclusive ?
"true" : "false")));
+ params.insert(make_pair(acl::PROP_AUTODELETE, std::string(autoDelete ?
"true" : "false")));
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_CREATE,acl::OBJ_QUEUE,name,¶ms)
)
throw NotAllowedException("ACL denied queue create request");
}
@@ -390,7 +390,7 @@
AclModule* acl = getBroker().getAcl();
if (acl)
{
- if
(!acl->authorise(getConnection().getUserId(),acl::PURGE,acl::QUEUE,queue,NULL) )
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_PURGE,acl::OBJ_QUEUE,queue,NULL)
)
throw NotAllowedException("ACL denied queue purge request");
}
getQueue(queue)->purge();
@@ -401,7 +401,7 @@
AclModule* acl = getBroker().getAcl();
if (acl)
{
- if
(!acl->authorise(getConnection().getUserId(),acl::DELETE,acl::QUEUE,queue,NULL)
)
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_DELETE,acl::OBJ_QUEUE,queue,NULL)
)
throw NotAllowedException("ACL denied queue delete request");
}
@@ -468,7 +468,7 @@
if (acl)
{
// add flags as needed
- if
(!acl->authorise(getConnection().getUserId(),acl::CONSUME,acl::QUEUE,queueName,NULL)
)
+ if
(!acl->authorise(getConnection().getUserId(),acl::ACT_CONSUME,acl::OBJ_QUEUE,queueName,NULL)
)
throw NotAllowedException("ACL denied Queue subscribe request");
}
@@ -637,7 +637,7 @@
}
return XaResult(XA_STATUS_XA_OK);
}
- } catch (const DtxTimeoutException& e) {
+ } catch (const DtxTimeoutException& /*e*/) {
return XaResult(XA_STATUS_XA_RBTIMEOUT);
}
}
@@ -656,7 +656,7 @@
state.startDtx(convert(xid), getBroker().getDtxManager(), join);
}
return XaResult(XA_STATUS_XA_OK);
- } catch (const DtxTimeoutException& e) {
+ } catch (const DtxTimeoutException& /*e*/) {
return XaResult(XA_STATUS_XA_RBTIMEOUT);
}
}
@@ -666,7 +666,7 @@
try {
bool ok = getBroker().getDtxManager().prepare(convert(xid));
return XaResult(ok ? XA_STATUS_XA_OK : XA_STATUS_XA_RBROLLBACK);
- } catch (const DtxTimeoutException& e) {
+ } catch (const DtxTimeoutException& /*e*/) {
return XaResult(XA_STATUS_XA_RBTIMEOUT);
}
}
@@ -677,7 +677,7 @@
try {
bool ok = getBroker().getDtxManager().commit(convert(xid), onePhase);
return XaResult(ok ? XA_STATUS_XA_OK : XA_STATUS_XA_RBROLLBACK);
- } catch (const DtxTimeoutException& e) {
+ } catch (const DtxTimeoutException& /*e*/) {
return XaResult(XA_STATUS_XA_RBTIMEOUT);
}
}
@@ -688,7 +688,7 @@
try {
getBroker().getDtxManager().rollback(convert(xid));
return XaResult(XA_STATUS_XA_OK);
- } catch (const DtxTimeoutException& e) {
+ } catch (const DtxTimeoutException& /*e*/) {
return XaResult(XA_STATUS_XA_RBTIMEOUT);
}
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp?rev=709282&r1=709281&r2=709282&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp
(original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp Thu
Oct 30 16:13:37 2008
@@ -489,10 +489,10 @@
if (acl != 0) {
string userId = ((const qpid::broker::ConnectionState*)
connToken)->getUserId();
std::map<acl::Property, string> params;
- params[acl::SCHEMAPACKAGE] = packageName;
- params[acl::SCHEMACLASS] = className;
+ params[acl::PROP_SCHEMAPACKAGE] = packageName;
+ params[acl::PROP_SCHEMACLASS] = className;
- if (!acl->authorise(userId, acl::ACCESS, acl::METHOD, methodName,
¶ms)) {
+ if (!acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_METHOD,
methodName, ¶ms)) {
outBuffer.putLong(Manageable::STATUS_FORBIDDEN);
outBuffer.putMediumString(Manageable::StatusText(Manageable::STATUS_FORBIDDEN));
outLen = MA_BUFFER_SIZE - outBuffer.available();
@@ -909,10 +909,10 @@
inBuffer.getBin128(hash);
inBuffer.getShortString(methodName);
- params[acl::SCHEMAPACKAGE] = packageName;
- params[acl::SCHEMACLASS] = className;
+ params[acl::PROP_SCHEMAPACKAGE] = packageName;
+ params[acl::PROP_SCHEMACLASS] = className;
- if (acl->authorise(userId, acl::ACCESS, acl::METHOD, methodName,
¶ms))
+ if (acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_METHOD,
methodName, ¶ms))
return true;
const framing::MessageProperties* p =
@@ -1090,7 +1090,7 @@
aft.decode(inBuffer);
}
}
- } catch (std::exception& e) {
+ } catch (std::exception& /*e*/) {
return 0;
}
@@ -1122,7 +1122,7 @@
FieldTable ft;
ft.decode(inBuffer);
}
- } catch (std::exception& e) {
+ } catch (std::exception& /*e*/) {
return 0;
}