summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/IconvStringConverter.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/Ice/IconvStringConverter.h')
-rw-r--r--cpp/include/Ice/IconvStringConverter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/include/Ice/IconvStringConverter.h b/cpp/include/Ice/IconvStringConverter.h
index 7e12263c27a..09b5e89f7b6 100644
--- a/cpp/include/Ice/IconvStringConverter.h
+++ b/cpp/include/Ice/IconvStringConverter.h
@@ -239,8 +239,12 @@ IconvStringConverter<charT>::toUTF8(const charT* sourceStart, const charT* sourc
//
// Reset cd
//
+#ifdef NDEBUG
+ iconv(cd, 0, 0, 0, 0);
+#else
int rs = iconv(cd, 0, 0, 0, 0);
assert(rs == 0);
+#endif
#ifdef ICE_CONST_ICONV_INBUF
const char* inbuf = reinterpret_cast<const char*>(sourceStart);
@@ -281,8 +285,12 @@ IconvStringConverter<charT>::fromUTF8(const Ice::Byte* sourceStart, const Ice::B
//
// Reset cd
//
+#ifdef NDEBUG
+ iconv(cd, 0, 0, 0, 0);
+#else
int rs = iconv(cd, 0, 0, 0, 0);
assert(rs == 0);
+#endif
#ifdef ICE_CONST_ICONV_INBUF
const char* inbuf = reinterpret_cast<const char*>(sourceStart);