stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r369110 - /incubator/stdcxx/trunk/src/wcodecvt.cpp
Date Sat, 14 Jan 2006 23:02:54 GMT
Author: sebor
Date: Sat Jan 14 15:02:51 2006
New Revision: 369110

URL: http://svn.apache.org/viewcvs?rev=369110&view=rev
Log:
2006-01-14  Martin Sebor  <sebor@roguewave.com>

	* wcodecvt.cpp (StateT): New convenience typedef.
	(__rw_libstd_do_out): Documented the purpose of dead code
	and unreachable warnings.

Modified:
    incubator/stdcxx/trunk/src/wcodecvt.cpp

Modified: incubator/stdcxx/trunk/src/wcodecvt.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/wcodecvt.cpp?rev=369110&r1=369109&r2=369110&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/wcodecvt.cpp (original)
+++ incubator/stdcxx/trunk/src/wcodecvt.cpp Sat Jan 14 15:02:51 2006
@@ -188,9 +188,14 @@
     ((!(impl) || ((x) & __rw_use_libc)) && !(UCS_TYPE (x) || UTF_TYPE (x)))
 
 
+// _RWSTD_MBSTATE_T macro might expand to char* (on AIX)
+typedef _RWSTD_MBSTATE_T StateT;
+
+
 _RWSTD_NAMESPACE (__rw) {
 
-static inline int __rw_mbsinit (const _RWSTD_MBSTATE_T *psrc)
+static inline int
+__rw_mbsinit (const StateT *psrc)
 {
 #ifndef _RWSTD_NO_MBSINIT
 
@@ -198,9 +203,6 @@
 
 #else   // if defined (_RWSTD_NO_MBSINIT)
 
-    // _RWSTD_MBSTATE_T macro might expand to char* (on AIX)
-    typedef _RWSTD_MBSTATE_T StateT;
-
     // commented out to work around an HP aCC 1.21 bug
     /* static */ const StateT state = StateT ();
     return !psrc || 0 == memcmp (psrc, &state, sizeof state);
@@ -620,7 +622,7 @@
 __rw_libc_do_unshift (_RWSTD_MBSTATE_T& state, char*& to_next, char* to_limit)
 {
     // save current state
-    const _RWSTD_MBSTATE_T tmp_state = state;
+    _RWSTD_MBSTATE_T tmp_state = state;
 
     // use libc locale to obtain the shift sequence
     char tmp [_RWSTD_MB_LEN_MAX];
@@ -872,7 +874,10 @@
             const char* utf = utfbuf;
             unsigned    off = __rw_mbtowco (tbl, utf, utf + utf8_len);
 
-            if (0 && _RWSTD_UINT_MAX == off) {
+            // FIXME: block below has been disabled but is being compiled
+            // to avoid syntax regressions; it might produce "unreachable
+            // code" warnings with some compilers
+            if (0 /* disbled */ && _RWSTD_UINT_MAX == off) {
                 // try transliteration
                 off = __rw_xlit (impl, utfbuf, utf8_len);
                 if (0 == off) {



Mime
View raw message