[enco] Resolve warning in release configuration (#9145)
author박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Fri, 22 Nov 2019 08:16:33 +0000 (17:16 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 22 Nov 2019 08:16:33 +0000 (17:16 +0900)
This commit resolve all the compiler warnings in enco codebase.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
compiler/enco/core/src/Backend.cpp
compiler/enco/core/src/Transforms/Split.cpp

index 3e0fe20..d4bec74 100644 (file)
@@ -58,7 +58,7 @@ namespace
 
 // has_inout_bag(m) returns true if there is a pair of coco::Input and coco::Output that share
 // the same bag as their backing storage
-bool has_inout_bag(const coco::Module *m)
+inline bool has_inout_bag(const coco::Module *m)
 {
   for (uint32_t n = 0; n < m->entity()->bag()->size(); ++n)
   {
index 1292bb0..b57b8f8 100644 (file)
@@ -268,7 +268,6 @@ public:
     {
       auto obj = _ker;
       auto shape = obj->shape();
-      auto len = nncc::core::ADT::kernel::num_elements(shape);
 
       auto ovl = data->f32()->read(obj);
       assert(ovl != nullptr);
@@ -301,7 +300,7 @@ public:
         }
       }
 
-      assert(values.size() == len);
+      assert(values.size() == nncc::core::ADT::kernel::num_elements(shape));
       binder->setOperand(ker, values.begin(), values.end());
     }