diff --git a/src/util/regex/regex-backref-matcher.hpp b/src/util/regex/regex-backref-matcher.hpp
index 5ae5f35..e2eabe8 100644
--- a/src/util/regex/regex-backref-matcher.hpp
+++ b/src/util/regex/regex-backref-matcher.hpp
@@ -30,9 +30,6 @@
 protected:
   virtual void 
   compile();
-    
-private:
-  int m_refNum;
 };
 
 } // namespace ndn
diff --git a/src/util/regex/regex-component-matcher.hpp b/src/util/regex/regex-component-matcher.hpp
index b102316..50cb8de 100644
--- a/src/util/regex/regex-component-matcher.hpp
+++ b/src/util/regex/regex-component-matcher.hpp
@@ -72,7 +72,7 @@
   m_pseudoMatcher.clear();
   m_pseudoMatcher.push_back(ptr_lib::make_shared<RegexPseudoMatcher>());
 
-  for (int i = 1; i < m_componentRegex.mark_count(); i++)
+  for (size_t i = 1; i < m_componentRegex.mark_count(); i++)
     {
       ptr_lib::shared_ptr<RegexPseudoMatcher> pMatcher = ptr_lib::make_shared<RegexPseudoMatcher>();
       m_pseudoMatcher.push_back(pMatcher);
@@ -102,7 +102,7 @@
       std::string targetStr = name.get(offset).toEscapedString();
       if(boost::regex_match(targetStr, subResult, m_componentRegex))
         {
-          for (int i = 1; i < m_componentRegex.mark_count(); i++)
+          for (size_t i = 1; i < m_componentRegex.mark_count(); i++)
             {
               m_pseudoMatcher[i]->resetMatchResult();
               m_pseudoMatcher[i]->setMatchResult(subResult[i]);
diff --git a/src/util/regex/regex-component-set-matcher.hpp b/src/util/regex/regex-component-set-matcher.hpp
index ffb4c6d..857c59e 100644
--- a/src/util/regex/regex-component-set-matcher.hpp
+++ b/src/util/regex/regex-component-set-matcher.hpp
@@ -107,9 +107,9 @@
 inline void 
 RegexComponentSetMatcher::compileSingleComponent()
 {
-  int end = extractComponent(1);
+  size_t end = extractComponent(1);
 
-  if(m_expr.size() != end)
+  if (m_expr.size() != end)
     {
       throw RegexMatcher::Error(std::string("Error: RegexComponentSetMatcher.compileSingleComponent: ")
                                 + m_expr);
diff --git a/src/util/regex/regex-matcher.hpp b/src/util/regex/regex-matcher.hpp
index baa8bf3..0d34311 100644
--- a/src/util/regex/regex-matcher.hpp
+++ b/src/util/regex/regex-matcher.hpp
@@ -66,7 +66,7 @@
 
 private:
   bool 
-  recursiveMatch(const int& mId, const Name& name, const int& offset, const int& len);
+  recursiveMatch(size_t mId, const Name& name, size_t offset, size_t len);
 
 
 protected:
@@ -124,7 +124,7 @@
 }
   
 inline bool 
-RegexMatcher::recursiveMatch(const int& mId, const Name& name, const int& offset, const int& len)
+RegexMatcher::recursiveMatch(size_t mId, const Name& name, size_t offset, size_t len)
 {
   // _LOG_TRACE ("Enter RegexMatcher::recursiveMatch");
 
diff --git a/src/util/regex/regex-pattern-list-matcher.hpp b/src/util/regex/regex-pattern-list-matcher.hpp
index 84b5c46..3ae74f1 100644
--- a/src/util/regex/regex-pattern-list-matcher.hpp
+++ b/src/util/regex/regex-pattern-list-matcher.hpp
@@ -32,10 +32,10 @@
   extractPattern(int index, int* next);
     
   int 
-  extractSubPattern(const char left, const char right, int index);
+  extractSubPattern(const char left, const char right, size_t index);
     
   int 
-  extractRepetition(int index);
+  extractRepetition(size_t index);
 
 private:
 
@@ -121,10 +121,10 @@
 }
   
 inline int 
-RegexPatternListMatcher::extractSubPattern(const char left, const char right, int index)
+RegexPatternListMatcher::extractSubPattern(const char left, const char right, size_t index)
 {
-  int lcount = 1;
-  int rcount = 0;
+  size_t lcount = 1;
+  size_t rcount = 0;
 
   while(lcount > rcount){
 
@@ -143,9 +143,9 @@
 }
 
 inline int 
-RegexPatternListMatcher::extractRepetition(int index)
+RegexPatternListMatcher::extractRepetition(size_t index)
 {
-  int exprSize = m_expr.size();
+  size_t exprSize = m_expr.size();
 
   if(index == exprSize)
     return index;
diff --git a/src/util/regex/regex-top-matcher.cpp b/src/util/regex/regex-top-matcher.cpp
index 38f1a5a..d3b8271 100644
--- a/src/util/regex/regex-top-matcher.cpp
+++ b/src/util/regex/regex-top-matcher.cpp
@@ -95,8 +95,8 @@
   else
     expand = m_expand;
 
-  int offset = 0;
-  while(offset < expand.size())
+  size_t offset = 0;
+  while (offset < expand.size())
     {
       std::string item = getItemFromExpand(expand, offset);
       if(item[0] == '<')
@@ -129,9 +129,9 @@
 }
 
 std::string
-RegexTopMatcher::getItemFromExpand(const std::string& expand, int & offset)
+RegexTopMatcher::getItemFromExpand(const std::string& expand, size_t& offset)
 {
-  int begin = offset;
+  size_t begin = offset;
 
   if(expand[offset] == '\\')
     {
@@ -155,8 +155,8 @@
       if(offset >= expand.size())
         throw RegexMatcher::Error("wrong format of expand string!");
         
-      int left = 1;
-      int right = 0;
+      size_t left = 1;
+      size_t right = 0;
       while(right < left)
         {
           if(expand[offset] == '<')
@@ -196,7 +196,7 @@
 RegexTopMatcher::convertSpecialChar(const std::string& str)
 {
   std::string newStr;
-  for(int i = 0; i < str.size(); i++)
+  for(size_t i = 0; i < str.size(); i++)
     {
       char c = str[i];
       switch(c)
diff --git a/src/util/regex/regex-top-matcher.hpp b/src/util/regex/regex-top-matcher.hpp
index fc4a0df..4d9c01e 100644
--- a/src/util/regex/regex-top-matcher.hpp
+++ b/src/util/regex/regex-top-matcher.hpp
@@ -43,7 +43,7 @@
 
 private:
   std::string
-  getItemFromExpand(const std::string& expand, int & offset);
+  getItemFromExpand(const std::string& expand, size_t& offset);
 
   static std::string
   convertSpecialChar(const std::string& str);
diff --git a/src/util/scheduler.cpp b/src/util/scheduler.cpp
index 377800f..fc6492f 100644
--- a/src/util/scheduler.cpp
+++ b/src/util/scheduler.cpp
@@ -76,8 +76,7 @@
 
 
 Scheduler::Scheduler(boost::asio::io_service& ioService)
-  : m_ioService(ioService)
-  , m_scheduledEvent(m_events.end())
+  : m_scheduledEvent(m_events.end())
   , m_deadlineTimer(ioService)
   , m_isEventExecuting(false)
 {
diff --git a/src/util/scheduler.hpp b/src/util/scheduler.hpp
index b7364ce..cc8bcce 100644
--- a/src/util/scheduler.hpp
+++ b/src/util/scheduler.hpp
@@ -56,8 +56,6 @@
   onEvent(const boost::system::error_code& code);
   
 private:
-  boost::asio::io_service& m_ioService;
-
   struct EventInfo
   {
     EventInfo(const time::nanoseconds& after,
diff --git a/src/util/string-helper.hpp b/src/util/string-helper.hpp
index 14f499e..9e2329c 100644
--- a/src/util/string-helper.hpp
+++ b/src/util/string-helper.hpp
@@ -23,7 +23,7 @@
 inline std::string 
 toHex(const uint8_t* array, size_t arraySize)
 {
-  if (!&array)
+  if (array == 0 || arraySize == 0)
     return "";
   
   std::ostringstream result;
