Compilation warnings. Part 2
authorTomasz Iwanek <t.iwanek@samsung.com>
Thu, 7 Feb 2013 10:23:01 +0000 (11:23 +0100)
committerZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Mon, 11 Feb 2013 09:06:24 +0000 (10:06 +0100)
[Issue#]       LINUXWRT-6
[Bug]          Compilation warnings
[Cause]        N/A
[Solution]     Remvoe them
[Verification] Build repository

Change-Id: I9bf7f3262672e3367a0a57b03dc793a3672124ba

3rdparty/minizip/unzip.c
modules/widget_dao/dao/global_dao_read_only.cpp
tests/dao/TestCases_PluginDAO.cpp
tests/dpl/db/test_orm.cpp

index 27ce758..9e61cfb 100644 (file)
@@ -585,7 +585,9 @@ local unzFile unzOpenInternal (const void *path,
                                zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
                                int is64bitOpenFunction)
 {
-    unz64_s us = {0, };
+    unz64_s us;
+    memset(&us,0,sizeof(unz64_s));
+
     unz64_s *s = NULL;
     ZPOS64_T central_pos;
     uLong   uL;
index 04b914f..d634523 100644 (file)
@@ -117,7 +117,7 @@ bool GlobalDAOReadOnly::IsValidSubTag(const DPL::String& tag, int type)
     WRT_DB_SELECT(select, iana_records, &WrtDatabase::interface())
     select->Where(Equals<iana_records::SUBTAG>(tag));
     auto row = select->GetRowList();
-    if (row.size() == 0 || row.front().Get_TYPE() != type) {
+    if (row.empty() || row.front().Get_TYPE() != type) {
         return false;
     } else {
         return true;
index 6309ad0..6c73a7b 100644 (file)
@@ -341,7 +341,7 @@ RUNNER_TEST(plugin_dao_test_get_implemented_objects_for_plugin_handle_1)
         RUNNER_ASSERT(dbHandle == handle);
         auto objects = dao.getImplementedObjectsForPluginHandle(dbHandle);
 
-        RUNNER_ASSERT(objects.size() == 0);
+        RUNNER_ASSERT(objects.empty());
     }
 }
 
index e5aef09..3e55a20 100644 (file)
@@ -363,9 +363,9 @@ RUNNER_TEST(ORM_Insert)
 
     TestTableInsert::Select select1(interface.get());
     std::list<int> resultList = select1.GetValueList<TestTableInsert::ColumnInt>();
-    RUNNER_ASSERT_MSG(
-        resultList.size() == 0, "Returned list has wrong size: " <<
-        resultList.size());
+    RUNNER_ASSERT_MSG(resultList.empty(),
+                      "Returned list has wrong size: " << resultList.size());
+
     std::list<TestTableInsert::Row> list;
 
     TestTableInsert::Insert insert(interface.get());