diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-01-24 00:08:35 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-01-24 00:08:35 +0000 |
commit | b78992bd696105626fc2e0f69fba018d5de4c36f (patch) | |
tree | a631acbbb3c0d0efe2c54b82172ecc9fd0102103 /cpp | |
parent | Fixed HP warning (diff) | |
download | ice-b78992bd696105626fc2e0f69fba018d5de4c36f.tar.bz2 ice-b78992bd696105626fc2e0f69fba018d5de4c36f.tar.xz ice-b78992bd696105626fc2e0f69fba018d5de4c36f.zip |
Removed HP warnings
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/Make.rules.HP-UX | 11 | ||||
-rwxr-xr-x | cpp/include/Ice/StringConverter.h | 2 | ||||
-rw-r--r-- | cpp/src/Freeze/SharedDb.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Object.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 2 | ||||
-rwxr-xr-x | cpp/src/Ice/StringConverter.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/DescriptorBuilder.cpp | 1 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 5 |
8 files changed, 15 insertions, 11 deletions
diff --git a/cpp/config/Make.rules.HP-UX b/cpp/config/Make.rules.HP-UX index e2beaa17ee1..8c4d1f1440e 100644 --- a/cpp/config/Make.rules.HP-UX +++ b/cpp/config/Make.rules.HP-UX @@ -24,14 +24,9 @@ endif # # -# Disable the following warnings: -# 307: Function defines return type, but contains no return at end of function. -# 361: Value-returning function might end without executing a return statement. -# 829: Implicit conversion of string literal to 'char *' is deprecated. -# 849: External symbol too long, truncated from xxx to 4000 -# 740: Unsafe cast between pointers/references to incomplete classes (required for db_cxx.h only) -# 749: The cast from 'const DbTxnImp *' to 'const __db_txn *' is performed as a 'reinterpret_cast' (db_cxx.h only). -DISABLEDWARNINGS = +W307 +W361 +W829 +W849 +W740 +W749 +# Disable the following future errors and warnings: +# 849: External symbol too long, truncated from xxxx to 4000 +DISABLEDWARNINGS = +W849 CXXFLAGS = -AA -mt $(DISABLEDWARNINGS) $(CXXARCHFLAGS) diff --git a/cpp/include/Ice/StringConverter.h b/cpp/include/Ice/StringConverter.h index f3ee57f9342..5dd3c2cff8c 100755 --- a/cpp/include/Ice/StringConverter.h +++ b/cpp/include/Ice/StringConverter.h @@ -96,7 +96,7 @@ public: UTF8Buffer&) const;
virtual void fromUTF8(const Byte* sourceStart, const Byte* sourceEnd,
- const wchar_t*& targetStart, const wchar_t*& targetEnd);
+ const wchar_t*& targetStart, const wchar_t*& targetEnd) const;
virtual void freeTarget(const wchar_t* targetStart) const;
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; |