Skip to content

Commit 666f95e

Browse files
Remove unused msgId variables in FesapiHdfProxy
Eliminated unnecessary assignment of return values from sendWithSpecificHandlerAndBlock in FesapiHdfProxy.cpp and FesapiHdfProxy.h. Also updated a cast in async_writeArrayNdSlab to use const int8_t* for improved type safety.
1 parent f6340a3 commit 666f95e

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

cmake/swigEtp1_2Include.i.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,7 @@ namespace ETP_NS
19511951
*
19521952
* @param dataspaceUris ETP general map where the values must be the URIs for the dataspaces the customer wants to lock or unlock.
19531953
* @param lock true for locking the dataspaces, false to unlock the dataspaces
1954+
*/
19541955
std::vector<std::string> lockDataspaces(const std::map<std::string, std::string>& dataspaceUris, bool lock);
19551956

19561957
/**

src/etp/fesapi/FesapiHdfProxy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayMetadata FesapiHdfPro
5353
// We don't care about the template parameter in this particular case
5454
auto handlers = std::make_shared<GetFullDataArrayHandlers<int64_t>>(session_, nullptr);
5555

56-
const int64_t msgId = session_->sendWithSpecificHandlerAndBlock(
56+
session_->sendWithSpecificHandlerAndBlock(
5757
buildGetDataArrayMetadataMessage(datasetName),
5858
handlers,
5959
0, 0x02);
@@ -454,7 +454,7 @@ std::set<int64_t> FesapiHdfProxy::async_writeArrayNdSlab(
454454
}
455455

456456
std::set<int64_t> intermediateResult = async_writeArrayNdSlab(groupName, datasetName, datatype,
457-
(int8_t*)values + (writtenTotalCount * valueSize), counts.get(),
457+
(const int8_t*)values + (writtenTotalCount * valueSize), counts.get(),
458458
starts.get(), numDimensions);
459459
sentMessageIds.insert(intermediateResult.begin(), intermediateResult.end());
460460
}

src/etp/fesapi/FesapiHdfProxy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ namespace ETP_NS
532532
auto specializedHandler = std::make_shared<GetFullDataArrayHandlers<T>>(session_, values);
533533
if (wholeSize + (valueCount + 1) * 8 <= maxAllowedDataArraySize) { // There can be valueCount array block and there is the length of the last array block
534534
// Get all values at once
535-
const int64_t msgId = session_->sendWithSpecificHandlerAndBlock(
535+
session_->sendWithSpecificHandlerAndBlock(
536536
buildGetDataArraysMessage(datasetName),
537537
specializedHandler,
538538
0, 0x02);
@@ -595,7 +595,7 @@ namespace ETP_NS
595595
}
596596

597597
// Send message
598-
const int64_t msgId = session_->sendWithSpecificHandlerAndBlock(
598+
session_->sendWithSpecificHandlerAndBlock(
599599
msg,
600600
specializedHandler,
601601
0, 0x02);

0 commit comments

Comments
 (0)