summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/SharedDb.h2
-rw-r--r--cpp/src/Ice/Object.cpp1
-rw-r--r--cpp/src/Ice/Proxy.cpp2
-rwxr-xr-xcpp/src/Ice/StringConverter.cpp2
-rw-r--r--cpp/src/IceGrid/DescriptorBuilder.cpp1
-rw-r--r--cpp/src/slice2cpp/Gen.cpp5
6 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/Freeze/SharedDb.h b/cpp/src/Freeze/SharedDb.h
index dd881f74725..eefdff0251e 100644
--- a/cpp/src/Freeze/SharedDb.h
+++ b/cpp/src/Freeze/SharedDb.h
@@ -101,7 +101,7 @@ public:
virtual int
get(DbTxn *txnid, Dbt *key, Dbt *data, u_int32_t flags)
{
- ::Db::get(txnid, key, data, flags);
+ return ::Db::get(txnid, key, data, flags);
}
#endif
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index 7a0150506dd..2e4179bbbbc 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -83,6 +83,7 @@ ObjectPtr
Ice::Object::ice_clone() const
{
throw CloneNotImplementedException(__FILE__, __LINE__);
+ return 0; // avoid warning with some compilers
}
void
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 6524a4ce9c3..0f0f282b38f 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -1147,12 +1147,14 @@ IceDelegateD::Ice::Object::ice_invoke(const string&,
const Context&)
{
throw CollocationOptimizationException(__FILE__, __LINE__);
+ return false;
}
ConnectionPtr
IceDelegateD::Ice::Object::ice_connection()
{
throw CollocationOptimizationException(__FILE__, __LINE__);
+ return 0;
}
void
diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp
index bf7ed7e4839..b7af5fd2585 100755
--- a/cpp/src/Ice/StringConverter.cpp
+++ b/cpp/src/Ice/StringConverter.cpp
@@ -61,7 +61,7 @@ UnicodeWstringConverter::toUTF8(const wchar_t* sourceStart,
void
UnicodeWstringConverter::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd,
- const wchar_t*& targetStart, const wchar_t*& targetEnd)
+ const wchar_t*& targetStart, const wchar_t*& targetEnd) const
{
size_t size = static_cast<size_t>(sourceEnd - sourceStart);
diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp
index 0608a9c5399..cf7c04f2538 100644
--- a/cpp/src/IceGrid/DescriptorBuilder.cpp
+++ b/cpp/src/IceGrid/DescriptorBuilder.cpp
@@ -586,6 +586,7 @@ ServiceDescriptorBuilder*
ServerDescriptorBuilder::createService(const XmlAttributesHelper& attrs)
{
throw "<service> element can only be a child of an <icebox> element";
+ return 0;
}
void
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index b94cdc7719c..81f34a76f51 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -2152,6 +2152,10 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p)
C << sp << nl << retS << nl << "IceDelegateD" << scoped << spar << params << epar;
C << sb;
C << nl << "throw ::Ice::CollocationOptimizationException(__FILE__, __LINE__);";
+ if(ret != 0)
+ {
+ C << nl << "return " << retS << "(); // to avoid a warning with some compilers;";
+ }
C << eb;
}
else
@@ -2510,6 +2514,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
else
{
C << nl << "throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);";
+ C << nl << "return 0; // to avoid a warning with some compilers";
}
C << eb;