[PATCH] osmo-trx[master]: Configuration: Fix const and signedness compile warnings

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Tom Tsou gerrit-no-reply at lists.osmocom.org
Tue Apr 4 01:55:55 UTC 2017


Review at  https://gerrit.osmocom.org/2221

Configuration: Fix const and signedness compile warnings

Change-Id: I701559814b2aee6f84f10e612f128da40f6a51c1
---
M CommonLibs/Configuration.cpp
M CommonLibs/ConfigurationTest.cpp
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/21/2221/1

diff --git a/CommonLibs/Configuration.cpp b/CommonLibs/Configuration.cpp
index bfff893..7ca193b 100644
--- a/CommonLibs/Configuration.cpp
+++ b/CommonLibs/Configuration.cpp
@@ -56,7 +56,7 @@
 static std::string replaceAll(const std::string input, const std::string search, const std::string replace)
 {
 	std::string output = input;
- 	int index = 0;
+	size_t index = 0;
 
 	while (true) {
 		index = output.find(search, index);
diff --git a/CommonLibs/ConfigurationTest.cpp b/CommonLibs/ConfigurationTest.cpp
index 2fd43e9..7042228 100644
--- a/CommonLibs/ConfigurationTest.cpp
+++ b/CommonLibs/ConfigurationTest.cpp
@@ -47,7 +47,7 @@
 
 	gConfig.setUpdateHook(purgeConfig);
 
-	char *keys[5] = {"key1", "key2", "key3", "key4", "key5"};
+	const char *keys[5] = {"key1", "key2", "key3", "key4", "key5"};
 
 	for (int i=0; i<5; i++) {
 		gConfig.set(keys[i],i);

-- 
To view, visit https://gerrit.osmocom.org/2221
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I701559814b2aee6f84f10e612f128da40f6a51c1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Tom Tsou <tom at tsou.cc>



More information about the gerrit-log mailing list