summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceSSL/RSACertificateGen.cpp7
-rw-r--r--cpp/src/IceXML/Parser.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/RSACertificateGen.cpp b/cpp/src/IceSSL/RSACertificateGen.cpp
index 182c349766c..49d889107b9 100644
--- a/cpp/src/IceSSL/RSACertificateGen.cpp
+++ b/cpp/src/IceSSL/RSACertificateGen.cpp
@@ -230,8 +230,11 @@ IceSSL::RSACertificateGen::generate(const RSACertificateGenContext& context)
assert(x509SelfSigned != 0);
// Set version to V3.
- int setVersionReturn = X509_set_version(x509SelfSigned, 2);
- assert(setVersionReturn != 0);
+#ifdef NDEBUG // Avoid compiler warnings when compiling with optimization.
+ X509_set_version(x509SelfSigned, 2);
+#else
+ assert(X509_set_version(x509SelfSigned, 2) != 0);
+#endif
ASN1_INTEGER_set(X509_get_serialNumber(x509SelfSigned), 0);
diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp
index 1951361e976..67ed145fbab 100644
--- a/cpp/src/IceXML/Parser.cpp
+++ b/cpp/src/IceXML/Parser.cpp
@@ -265,8 +265,11 @@ IceXML::DocumentBuilder::startElement(const string& name, const Attributes& attr
NodePtr parent = _nodeStack.front();
Element* element = new Element(parent, name, attributes, line, column);
- bool b = parent->addChild(element);
- assert(b);
+#if NDEBUG
+ parent->addChild(element);
+#else
+ assert(parent->addChild(element));
+#endif
_nodeStack.push_front(element);
}