From 11168cb9c9e80398392a5001d994e84957d610b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 22 Nov 2019 17:16:33 +0900 Subject: [PATCH] [enco] Resolve warning in release configuration (#9145) This commit resolve all the compiler warnings in enco codebase. Signed-off-by: Jonghyun Park --- compiler/enco/core/src/Backend.cpp | 2 +- compiler/enco/core/src/Transforms/Split.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/enco/core/src/Backend.cpp b/compiler/enco/core/src/Backend.cpp index 3e0fe20..d4bec74 100644 --- a/compiler/enco/core/src/Backend.cpp +++ b/compiler/enco/core/src/Backend.cpp @@ -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) { diff --git a/compiler/enco/core/src/Transforms/Split.cpp b/compiler/enco/core/src/Transforms/Split.cpp index 1292bb0..b57b8f8 100644 --- a/compiler/enco/core/src/Transforms/Split.cpp +++ b/compiler/enco/core/src/Transforms/Split.cpp @@ -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()); } -- 2.7.4