From 104f09c95af2b3068e7afd655e4cebcad2bf0617 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 25 Jan 2022 09:56:04 -0800 Subject: Enable readability-named-parameter checks We don't have too many violations here, probably because we don't have many optional parameters. Fix the existing instances, and enable the check. Signed-off-by: Ed Tanous Change-Id: I4d512f0ec90b060fb60a42fe3cd6ba72fb6c6bcb --- include/cors_preflight.hpp | 4 ++-- include/ibm/locks.hpp | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/cors_preflight.hpp b/include/cors_preflight.hpp index 1cd8564704..29d7475cae 100644 --- a/include/cors_preflight.hpp +++ b/include/cors_preflight.hpp @@ -10,8 +10,8 @@ inline void requestRoutes(App& app) { BMCWEB_ROUTE(app, "") .methods(boost::beast::http::verb::options)( - [](const crow::Request&, const std::shared_ptr&, - const std::string&) { + [](const crow::Request& /*req*/, + const std::shared_ptr&, const std::string&) { // An empty body handler that simply returns the headers bmcweb // uses This allows browsers to do their CORS preflight checks }); diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp index 45525bffa2..4434e1f117 100644 --- a/include/ibm/locks.hpp +++ b/include/ibm/locks.hpp @@ -51,7 +51,7 @@ class Lock * Returns : False (if not a Valid lock request) */ - virtual bool isValidLockRequest(const LockRequest&); + virtual bool isValidLockRequest(const LockRequest& refLockRecord); /* * This function implements the logic of checking if the incoming @@ -61,7 +61,7 @@ class Lock * Returns : False (if not conflicting) */ - virtual bool isConflictRequest(const LockRequests&); + virtual bool isConflictRequest(const LockRequests& refLockRequestStructure); /* * Implements the core algorithm to find the conflicting * lock requests. @@ -72,7 +72,8 @@ class Lock * Returns : True (if conflicting) * Returns : False (if not conflicting) */ - virtual bool isConflictRecord(const LockRequest&, const LockRequest&); + virtual bool isConflictRecord(const LockRequest& refLockRecord1, + const LockRequest& refLockRecord2); /* * This function implements the logic of checking the conflicting @@ -81,7 +82,7 @@ class Lock * */ - virtual Rc isConflictWithTable(const LockRequests&); + virtual Rc isConflictWithTable(const LockRequests& refLockRequestStructure); /* * This function implements the logic of checking the ownership of the * lock from the releaselock request. @@ -90,22 +91,22 @@ class Lock * Returns : False (if the request HMC or Session does not own the lock(s)) */ - virtual RcRelaseLock isItMyLock(const ListOfTransactionIds&, - const SessionFlags&); + virtual RcRelaseLock isItMyLock(const ListOfTransactionIds& refRids, + const SessionFlags& ids); /* * This function validates the the list of transactionID's and returns false * if the transaction ID is not valid & not present in the lock table */ - virtual bool validateRids(const ListOfTransactionIds&); + virtual bool validateRids(const ListOfTransactionIds& refRids); /* * This function releases the locks that are already obtained by the * requesting Management console. */ - void releaseLock(const ListOfTransactionIds&); + void releaseLock(const ListOfTransactionIds& refRids); Lock() { @@ -117,7 +118,8 @@ class Lock * bytes of the resource id based on the lock management algorithm. */ - bool checkByte(uint64_t, uint64_t, uint32_t); + static bool checkByte(uint64_t resourceId1, uint64_t resourceId2, + uint32_t position); /* * This functions implements a counter that generates a unique 32 bit @@ -143,7 +145,7 @@ class Lock * */ - RcAcquireLock acquireLock(const LockRequests&); + RcAcquireLock acquireLock(const LockRequests& lockRequestStructure); /* * This function implements the logic for releasing the lock that are @@ -156,21 +158,21 @@ class Lock * Client can choose either of the ways by using `Type` JSON key. * */ - RcReleaseLockApi releaseLock(const ListOfTransactionIds&, - const SessionFlags&); + RcReleaseLockApi releaseLock(const ListOfTransactionIds& p, + const SessionFlags& ids); /* * This function implements the logic for getting the list of locks obtained * by a particular management console. */ - RcGetLockList getLockList(const ListOfSessionIds&); + RcGetLockList getLockList(const ListOfSessionIds& listSessionId); /* * This function is releases all the locks obtained by a particular * session. */ - void releaseLock(const std::string&); + void releaseLock(const std::string& sessionId); static Lock& getInstance() { -- cgit v1.2.3