From 8d3ae8c6546dcfdc06cf84e1a59bc2a615651a72 Mon Sep 17 00:00:00 2001 From: rajkumar38 <54936542+rajkumar38@users.noreply.github.com> Date: Tue, 21 Jul 2020 18:53:10 +0530 Subject: [PATCH] [syncd] ARM32 bit fixes, for 64bit printf format specifier. (#643) * [syncd] ARM32 bit fixes, for 64bit printf format specifier. Signed-off-by: Rajkumar Pennadam Ramamoorthy * [syncd] ARM32 bit fixes, for 64bit printf format specifier. Signed-off-by: Rajkumar Pennadam Ramamoorthy --- meta/Meta.cpp | 4 ++-- syncd/SingleReiniter.cpp | 5 +++-- syncd/Syncd.cpp | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/Meta.cpp b/meta/Meta.cpp index 34e5b1b80..9a6c3dc64 100644 --- a/meta/Meta.cpp +++ b/meta/Meta.cpp @@ -4025,7 +4025,7 @@ sai_status_t Meta::meta_sai_validate_nat_entry( if (object_type == SAI_OBJECT_TYPE_NULL) { - SWSS_LOG_ERROR("virtual router oid 0x%lx is not valid object type, " + SWSS_LOG_ERROR("virtual router oid 0x%" PRIx64 " is not valid object type, " "returned null object type", vr); return SAI_STATUS_INVALID_PARAMETER; @@ -4035,7 +4035,7 @@ sai_status_t Meta::meta_sai_validate_nat_entry( if (object_type != expected) { - SWSS_LOG_ERROR("virtual router oid 0x%lx type %d is wrong type, " + SWSS_LOG_ERROR("virtual router oid 0x%" PRIx64 " type %d is wrong type, " "expected object type %d", vr, object_type, expected); return SAI_STATUS_INVALID_PARAMETER; diff --git a/syncd/SingleReiniter.cpp b/syncd/SingleReiniter.cpp index 7fe052082..cadf2bdce 100644 --- a/syncd/SingleReiniter.cpp +++ b/syncd/SingleReiniter.cpp @@ -10,6 +10,7 @@ #include "meta/sai_serialize.h" #include +#include using namespace syncd; using namespace saimeta; @@ -735,7 +736,7 @@ sai_object_id_t SingleReiniter::processSingleVid( } else { - SWSS_LOG_DEBUG("setting attributes on object of type %x, processed VID 0x%lx to RID 0x%lx", objectType, vid, rid); + SWSS_LOG_DEBUG("setting attributes on object of type %x, processed VID 0x%" PRIx64 " to RID 0x%" PRIx64 " ", objectType, vid, rid); for (uint32_t idx = 0; idx < attrCount; idx++) { @@ -965,7 +966,7 @@ void SingleReiniter::processStructNonObjectIds( m->setoid(&meta_key, rid); - SWSS_LOG_DEBUG("processed vid 0x%lx to rid 0x%lx in %s:%s", vid, rid, + SWSS_LOG_DEBUG("processed vid 0x%" PRIx64 " to rid 0x%" PRIx64 " in %s:%s", vid, rid, info->objecttypename, m->membername); } diff --git a/syncd/Syncd.cpp b/syncd/Syncd.cpp index 9aae66052..598aec166 100644 --- a/syncd/Syncd.cpp +++ b/syncd/Syncd.cpp @@ -19,6 +19,7 @@ #include "meta/sai_serialize.h" #include +#include #include #include @@ -3172,7 +3173,7 @@ void Syncd::performWarmRestartSingleSwitch( if (originalSwitchRid != switchRid) { - SWSS_LOG_THROW("Unexpected RID 0x%lx (expected 0x%lx)", + SWSS_LOG_THROW("Unexpected RID 0x%" PRIx64 " (expected 0x%" PRIx64 " )", switchRid, originalSwitchRid); }