In shared/utils.h, max_key is uninitialized as detected by static analysis tools. However, since key values appear to be initialized to 1 (and only grow) in all use cases, functionally, it shouldn't be an issue since itr->second > max_cnt will always result as true before the equality check comes into play. To avoid static analysis warnings, perhaps consider setting max_key to 0.
Pull request #118 resolves this by just removing this function (and, indeed, removing the fundamentally linear search that is implemented in this function!)
In shared/utils.h,
max_key
is uninitialized as detected by static analysis tools. However, since key values appear to be initialized to 1 (and only grow) in all use cases, functionally, it shouldn't be an issue sinceitr->second > max_cnt
will always result as true before the equality check comes into play. To avoid static analysis warnings, perhaps consider settingmax_key
to 0.