Skip to content

[XPTI] Addresses build warnings reported #4375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions xptifw/include/xpti_int64_hash_table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ class Hash64x64Table {
public:
using ht_lut_t = std::unordered_map<int64_t, int64_t>;

Hash64x64Table(int size = 1024)
: MForward(size), MReverse(size), MTableSize(size) {
Hash64x64Table(int size = 1024) : MForward(size), MReverse(size) {
#ifdef XPTI_STATISTICS
MInsertions = 0;
MRetrievals = 0;
Expand Down Expand Up @@ -267,10 +266,9 @@ class Hash64x64Table {
}

private:
ht_lut_t MForward; ///< Forward lookup hash map
ht_lut_t MReverse; ///< Reverse lookup hash map
int32_t MTableSize; ///< Initial size of the hash map
std::mutex MMutex; ///< Mutex required to implement a double-check pattern
ht_lut_t MForward; ///< Forward lookup hash map
ht_lut_t MReverse; ///< Reverse lookup hash map
std::mutex MMutex; ///< Mutex required to implement a double-check pattern
#ifdef XPTI_STATISTICS
safe_uint64_t MInsertions, ///< Thread-safe tracking of insertions
MRetrievals; ///< Thread-safe tracking of lookups
Expand Down
2 changes: 1 addition & 1 deletion xptifw/include/xpti_string_table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class StringTable {

// Clear all the contents of this string table and get it ready for re-use
void clear() {
MIds = {1};
MIds = 1;
MIDToString.clear();
MStringToID.clear();

Expand Down
6 changes: 3 additions & 3 deletions xptifw/src/xpti_trace_framework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ class Tracepoints {
// We will always start our ID
// stream from 1. 0 is null_id
// and -1 is invalid_id
MUId = {1};
MInsertions = MRetrievals = {0};
MUId = 1;
MInsertions = MRetrievals = 0;
MPayloads.clear();
MEvents.clear();
}
Expand Down Expand Up @@ -776,7 +776,7 @@ class Framework {
}

void clear() {
MUniversalIDs = {1};
MUniversalIDs = 1;
MTracepoints.clear();
MStringTableRef.clear();
}
Expand Down