From 1066befd816055522cd145ed024df9255e4dfe24 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Thu, 7 Feb 2013 11:23:01 +0100 Subject: [PATCH] Compilation warnings. Part 2 [Issue#] LINUXWRT-6 [Bug] Compilation warnings [Cause] N/A [Solution] Remvoe them [Verification] Build repository Change-Id: I9bf7f3262672e3367a0a57b03dc793a3672124ba --- 3rdparty/minizip/unzip.c | 4 +++- modules/widget_dao/dao/global_dao_read_only.cpp | 2 +- tests/dao/TestCases_PluginDAO.cpp | 2 +- tests/dpl/db/test_orm.cpp | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/3rdparty/minizip/unzip.c b/3rdparty/minizip/unzip.c index 27ce758..9e61cfb 100644 --- a/3rdparty/minizip/unzip.c +++ b/3rdparty/minizip/unzip.c @@ -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; diff --git a/modules/widget_dao/dao/global_dao_read_only.cpp b/modules/widget_dao/dao/global_dao_read_only.cpp index 04b914f..d634523 100644 --- a/modules/widget_dao/dao/global_dao_read_only.cpp +++ b/modules/widget_dao/dao/global_dao_read_only.cpp @@ -117,7 +117,7 @@ bool GlobalDAOReadOnly::IsValidSubTag(const DPL::String& tag, int type) WRT_DB_SELECT(select, iana_records, &WrtDatabase::interface()) select->Where(Equals(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; diff --git a/tests/dao/TestCases_PluginDAO.cpp b/tests/dao/TestCases_PluginDAO.cpp index 6309ad0..6c73a7b 100644 --- a/tests/dao/TestCases_PluginDAO.cpp +++ b/tests/dao/TestCases_PluginDAO.cpp @@ -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()); } } diff --git a/tests/dpl/db/test_orm.cpp b/tests/dpl/db/test_orm.cpp index e5aef09..3e55a20 100644 --- a/tests/dpl/db/test_orm.cpp +++ b/tests/dpl/db/test_orm.cpp @@ -363,9 +363,9 @@ RUNNER_TEST(ORM_Insert) TestTableInsert::Select select1(interface.get()); std::list resultList = select1.GetValueList(); - 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 list; TestTableInsert::Insert insert(interface.get()); -- 2.7.4