[Coverity] Resolve coverity issues due to printf format
authorDongju Chae <dongju.chae@samsung.com>
Tue, 11 Aug 2020 09:22:55 +0000 (18:22 +0900)
committer송욱/On-Device Lab(SR)/Staff Engineer/삼성전자 <wook16.song@samsung.com>
Wed, 12 Aug 2020 01:35:58 +0000 (10:35 +0900)
This patch resolves coveirty issues due to invalid type in printf
format (PRINTF_ARGS).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
src/core/ne-model.cc
src/core/ne-segment-table.cc

index 0729d24..9420603 100644 (file)
@@ -60,7 +60,7 @@ Metadata::extractMetadata (void *data)
     meta.reset (Metadata_v3::createInstance (meta_data));
     break;
   default:
-    logerr (TAG, "Invalid NPU binary format version: %d\n",
+    logerr (TAG, "Invalid NPU binary format version: %" PRIu64 "\n",
         NPUBIN_VERSION (meta_data->magiccode));
     break;
   }
index 75b9fb7..82dd073 100644 (file)
@@ -140,7 +140,7 @@ SegmentTable::createWeightSegment (const Model *model)
     return 0;
 
   if (meta->getWeightSize () > size) {
-    logerr (TAG, "The size of weight (%u) is larger than segment size (%u)\n",
+    logerr (TAG, "The size of weight (%" PRIu64 ") is larger than segment size (%u)\n",
         meta->getWeightSize (), size);
     return -EINVAL;
   }