src: Enabling -Werror in debug mode and some style updates

Several important warnings are still getting suppressed, because of
CryptoPP library

Change-Id: I8fb3d938544ecc38c65529262504dc753124bafd
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)