aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-11-03 23:08:41 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-11-03 23:08:41 +0000
commit759aa5dea6a98810bec616f61d4846dee268c8d7 (patch)
treee45e34dec07944fd9b4b445961248352e78b4577
parent24229aaf1b00d4f51ea0008d3a30ea174febbca0 (diff)
downloadpaludis-759aa5dea6a98810bec616f61d4846dee268c8d7.tar.gz
paludis-759aa5dea6a98810bec616f61d4846dee268c8d7.tar.xz
Silence some g++-4.2 warnings
-rw-r--r--paludis/args/args_TEST.cc6
-rw-r--r--paludis/repositories/nothing/nothing_repository.cc8
-rw-r--r--paludis/repositories/portage/make_ebin_repository.cc8
-rw-r--r--paludis/repositories/portage/make_ebuild_repository.cc8
4 files changed, 15 insertions, 15 deletions
diff --git a/paludis/args/args_TEST.cc b/paludis/args/args_TEST.cc
index ad17690..a2cf285 100644
--- a/paludis/args/args_TEST.cc
+++ b/paludis/args/args_TEST.cc
@@ -107,7 +107,7 @@ namespace test_cases
void run()
{
- char * args[] = { "program-name", "--other-baz", "-fsne", "blah", "7", "three", "--", "--dummy",
+ const char * args[] = { "program-name", "--other-baz", "-fsne", "blah", "7", "three", "--", "--dummy",
"one", "two" };
CommandLine c1;
c1.run(10, args);
@@ -142,7 +142,7 @@ namespace test_cases
void run()
{
- char *args[] = { "program-name", "-e" };
+ const char *args[] = { "program-name", "-e" };
CommandLine c1;
TEST_CHECK_THROWS(c1.run(2, args), MissingValue);
}
@@ -158,7 +158,7 @@ namespace test_cases
void run()
{
- char *args[] = { "program-name", "--stringset", "one", "-t", "two", "-t", "three", "fnord" };
+ const char *args[] = { "program-name", "--stringset", "one", "-t", "two", "-t", "three", "fnord" };
CommandLine c1;
c1.run(8, args);
TEST_CHECK(c1.arg_stringset.specified());
diff --git a/paludis/repositories/nothing/nothing_repository.cc b/paludis/repositories/nothing/nothing_repository.cc
index 4c9127e..4960daf 100644
--- a/paludis/repositories/nothing/nothing_repository.cc
+++ b/paludis/repositories/nothing/nothing_repository.cc
@@ -186,8 +186,8 @@ NothingRepository::make_nothing_repository(
throw NothingRepositoryConfigurationError("Key 'location' not specified or empty");
std::string sync;
- if (m->end() == m->find("sync") || ((sync = m->find("sync")->second)).empty())
- ; // nothing
+ if (m->end() != m->find("sync"))
+ sync = m->find("sync")->second;
std::string name;
if (m->end() == m->find("name") || ((name = m->find("name")->second)).empty())
@@ -195,8 +195,8 @@ NothingRepository::make_nothing_repository(
+ repo_file + "'");
std::string sync_exclude;
- if (m->end() == m->find("sync_exclude") || ((sync_exclude = m->find("sync_exclude")->second)).empty())
- ; // nothing
+ if (m->end() != m->find("sync_exclude"))
+ sync_exclude = m->find("sync_exclude")->second;
return CountedPtr<Repository>(new NothingRepository(NothingRepositoryParams::create()
.name(name)
diff --git a/paludis/repositories/portage/make_ebin_repository.cc b/paludis/repositories/portage/make_ebin_repository.cc
index 66acaee..bd94cc3 100644
--- a/paludis/repositories/portage/make_ebin_repository.cc
+++ b/paludis/repositories/portage/make_ebin_repository.cc
@@ -66,12 +66,12 @@ paludis::make_ebin_repository(
newsdir = location + "/metadata/news";
std::string sync;
- if (m->end() == m->find("sync") || ((sync = m->find("sync")->second)).empty())
- ; // nothing
+ if (m->end() == m->find("sync"))
+ sync = m->find("sync")->second;
std::string sync_exclude;
- if (m->end() == m->find("sync_exclude") || ((sync_exclude = m->find("sync_exclude")->second)).empty())
- ; // nothing
+ if (m->end() == m->find("sync_exclude"))
+ sync_exclude = m->find("sync_exclude")->second;
std::string root;
if (m->end() == m->find("root") || ((root = m->find("root")->second)).empty())
diff --git a/paludis/repositories/portage/make_ebuild_repository.cc b/paludis/repositories/portage/make_ebuild_repository.cc
index b43ffed..744b332 100644
--- a/paludis/repositories/portage/make_ebuild_repository.cc
+++ b/paludis/repositories/portage/make_ebuild_repository.cc
@@ -99,12 +99,12 @@ paludis::make_ebuild_repository(
}
std::string sync;
- if (m->end() == m->find("sync") || ((sync = m->find("sync")->second)).empty())
- ; // nothing
+ if (m->end() != m->find("sync"))
+ sync = m->find("sync")->second;
std::string sync_exclude;
- if (m->end() == m->find("sync_exclude") || ((sync_exclude = m->find("sync_exclude")->second)).empty())
- ; // nothing
+ if (m->end() != m->find("sync_exclude"))
+ sync_exclude = m->find("sync_exclude")->second;
std::string root;
if (m->end() == m->find("root") || ((root = m->find("root")->second)).empty())