Skip to content
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

Fixed compile errors caused by conversion from int to uint16_t #3395

Merged
Merged
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
6 changes: 3 additions & 3 deletions orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5938,7 +5938,7 @@ bool MetaDataMgr::isValidMetaData(uint16_t metadata)

uint16_t MetaDataMgr::getFreeMetaData(uint8_t dscp)
{
uint16_t metadata = metaMax + 1;
uint16_t metadata = (uint16_t)(metaMax + 1);
SWSS_LOG_INFO("Metadata Request for dscp %d", dscp);

if (initComplete)
Expand All @@ -5962,7 +5962,7 @@ uint16_t MetaDataMgr::getFreeMetaData(uint8_t dscp)
m_dscpMetadata[dscp] = metadata;
SWSS_LOG_INFO("New Metadata %d allocated for dscp %d", metadata, dscp);
}
m_MetadataRef[metadata] += 1;
m_MetadataRef[metadata] = (uint16_t)(m_MetadataRef[metadata] + 1);
}
else
{
Expand All @@ -5975,7 +5975,7 @@ void MetaDataMgr::recycleMetaData(uint16_t metadata)
{
if (initComplete)
{
m_MetadataRef[metadata] -= 1;
m_MetadataRef[metadata] = (uint16_t)(m_MetadataRef[metadata] - 1);
SWSS_LOG_INFO("Freeing Metadata %d refcount %d", metadata, m_MetadataRef[metadata]);
if (m_MetadataRef[metadata] == 0)
{
Expand Down
Loading