[ML] Fixed logger type with macro 85/252785/1 accepted/tizen/unified/20210208.134816 submit/tizen/20210202.085424
authorPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 2 Feb 2021 07:43:47 +0000 (08:43 +0100)
committerPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 2 Feb 2021 08:13:51 +0000 (09:13 +0100)
For some architectures int64_t is not casted to lld, for partablitiy
stackoverflow suggests using macro.

[Verification] Code compiles for aarch64 architecture

Change-Id: I7aaa3dabeacae6ea7b212c09c5070ff011c64ab1

src/ml/ml_pipeline_nodeinfo.cc

index c6ebfbfa17ac79b1c6788908f063af62216c46e1..d01f997b3d5bf1fdf9a3cd7ca5ddae5cba179bd4 100644 (file)
@@ -14,6 +14,7 @@
  *    limitations under the License.
  */
 
+#include <inttypes.h>
 #include <tizen.h>
 
 #include "common/logger.h"
@@ -122,7 +123,7 @@ PlatformResult NodeInfo::getProperty(const std::string& name, const std::string&
               get_error_message(ret));
       return util::ToPlatformResult(ret, "Could not get property of NodeInfo");
     }
-    LoggerD("getProperty Int64 %lld", val);
+    LoggerD("getProperty Int64 %" PRId64, val);
     property->insert(std::make_pair(kProperty, picojson::value(static_cast<double>(val))));
   } else if (kUINT32 == type) {
     uint32_t val;
@@ -142,7 +143,7 @@ PlatformResult NodeInfo::getProperty(const std::string& name, const std::string&
               get_error_message(ret));
       return util::ToPlatformResult(ret, "Could not get property of NodeInfo");
     }
-    LoggerD("getProperty UInt64 %llu", val);
+    LoggerD("getProperty UInt64 %" PRIu64, val);
     property->insert(std::make_pair(kProperty, picojson::value(static_cast<double>(val))));
   } else if (kSTRING == type) {
     char* val;