Fix stylecheck and warnings 51/41951/1
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 17 Jun 2015 15:28:48 +0000 (17:28 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Fri, 19 Jun 2015 08:37:18 +0000 (10:37 +0200)
Change-Id: I65b18a60db3dfad37a9dd90fff1824531d0e99a7

src/common/step/step_generate_xml.cc
src/common/step/step_unzip.cc
src/tpk/step/step_parse.cc
src/wgt/step/step_parse.cc
src/xml_parser/xml_parser.cc

index 322668c..997fe80 100755 (executable)
@@ -25,7 +25,7 @@ namespace common_installer {
 namespace generate_xml {
 
 static void _writeUIApplicationAttributes(
-    xmlTextWriterPtr writer, uiapplication_x *app) {
+    xmlTextWriterPtr writer, uiapplication_x */*app*/) {
     xmlTextWriterWriteAttribute(writer, BAD_CAST "taskmanage",
         BAD_CAST "true");
 }
@@ -66,7 +66,7 @@ Step::Status StepGenerateXml::GenerateApplicationCommonXml(T* app,
   if (std::is_same<T, serviceapplication_x>::value)
     _writeServiceApplicationAttributes(
         writer, reinterpret_cast<serviceapplication_x *>(app));
-  if(app->label){
+  if (app->label) {
     label_x* label = nullptr;
     LISTHEAD(app->label, label);
     for (; label; label = label->next) {
index 64e5e6b..d06392a 100644 (file)
@@ -41,7 +41,7 @@ bool CheckFreeSpaceAtPath(int64_t required_size,
     return false;
   }
 
-  return (space_info.free >= required_size);
+  return (space_info.free >= static_cast<uint64_t>(required_size));
 }
 
 }  // namespace
index 9ba373a..de2f87d 100644 (file)
@@ -264,7 +264,7 @@ bool StepParse::SetPkgInfoChildren(manifest_x* m,
 
     // icon
     SetChildren(&(p->icon), tree, el, "icon",
-        [&](XmlElement *el, icon_x* p){
+        [&](XmlElement *el, icon_x* p) {  // NOLINT
       p->text = string_strdup(el->content());
       // NOTE: name is an attribute, but the xml writer uses it as text.
       // This must be fixed in whole app-installer modules, including wgt.
@@ -275,7 +275,7 @@ bool StepParse::SetPkgInfoChildren(manifest_x* m,
 
     // label
     SetChildren(&(p->label), tree, el, "label",
-        [&](XmlElement *el, label_x* p){
+        [&](XmlElement *el, label_x* p) {
       // NOTE: name is an attribute, but the xml writer uses it as text.
       // This must be fixed in whole app-installer modules, including wgt.
       // Current implementation is just for compatibility.
index f11f160..ae6d5ee 100755 (executable)
@@ -304,7 +304,7 @@ common_installer::Step::Status StepParse::process() {
   const std::string& version = wgt_info->version();
   const std::string& required_api_version = info->required_version();
 
-  if(manifest->uiapplication->label){
+  if (manifest->uiapplication->label) {
     context_->config_data.get().application_name.set(
         std::string(manifest->uiapplication->label->name));
   }
index ab1dfe6..1c1bbde 100644 (file)
@@ -72,7 +72,7 @@ const string& XmlElement::null_string() {
 
 
 // class XmlTree
-XmlTree::XmlTree(xmlDoc* doc) : doc_(doc), root_(nullptr) {
+XmlTree::XmlTree(xmlDoc* doc) : root_(nullptr), doc_(doc) {
 }
 
 XmlTree::~XmlTree() {