Fix static analysis issue
[platform/core/appfw/pkgmgr-info.git] / src / server / appinfo_internal.cc
index 1e05dce..d6f2359 100644 (file)
@@ -85,11 +85,11 @@ void ParseAppControl(GList** appcontrol,
 
 int GetSplashScreens(const tizen_base::Database& db,
     const char* appid, GList** splashscreens) {
-  auto q = tizen_base::Database::Sql(
+  auto q = std::move(tizen_base::Database::Sql(
       "SELECT src, type, orientation, indicatordisplay, "
       "operation, color_depth "
       "FROM package_app_splash_screen WHERE app_id=?")
-      .Bind(appid);
+      .Bind(appid));
 
   auto r = db.Exec(q);
   if (!r) {
@@ -120,10 +120,10 @@ int GetSplashScreens(const tizen_base::Database& db,
 
 int GetMetadata(const tizen_base::Database& db,
     const char* appid, GList** metadata) {
-  auto q = tizen_base::Database::Sql(
+  auto q = std::move(tizen_base::Database::Sql(
       "SELECT md_key, md_value "
       "FROM package_app_app_metadata WHERE app_id=?")
-      .Bind(appid);
+      .Bind(appid));
 
   auto r = db.Exec(q);
   if (!r) {
@@ -150,10 +150,10 @@ int GetMetadata(const tizen_base::Database& db,
 
 int GetAppControl(const tizen_base::Database& db,
     const char* appid, GList** appcontrol) {
-  auto q = tizen_base::Database::Sql(
+  auto q = std::move(tizen_base::Database::Sql(
       "SELECT app_control, visibility, app_control_id "
       "FROM package_app_app_control WHERE app_id=?")
-      .Bind(appid);
+      .Bind(appid));
 
   auto r = db.Exec(q);
   if (!r) {
@@ -171,10 +171,10 @@ int GetAppControl(const tizen_base::Database& db,
 
 int GetCategory(const tizen_base::Database& db,
     const char* appid, GList** category) {
-  auto q = tizen_base::Database::Sql(
+  auto q = std::move(tizen_base::Database::Sql(
       "SELECT category "
       "FROM package_app_app_category WHERE app_id=?")
-      .Bind(appid);
+      .Bind(appid));
   auto r = db.Exec(q);
   if (!r) {
     _LOGE("db.Exec() failed: %s", static_cast<const char*>(r));
@@ -192,10 +192,10 @@ int GetCategory(const tizen_base::Database& db,
 
 int GetResControl(const tizen_base::Database& db, const char* appid,
     GList** res_control) {
-  auto q = tizen_base::Database::Sql(
+  auto q = std::move(tizen_base::Database::Sql(
       "SELECT res_type, min_res_version, max_res_version, auto_close "
       "FROM package_app_res_control WHERE app_id=?")
-      .Bind(appid);
+      .Bind(appid));
 
   auto r = db.Exec(q);
   if (!r) {