Author: sebor
Date: Wed Apr 23 12:49:32 2008
New Revision: 651029

URL: http://svn.apache.org/viewvc?rev=651029&view=rev
Log:
2008-04-23  Martin Sebor  <[EMAIL PROTECTED]>

        STDCXX-745
        STDCXX-746
        STDCXX-747
        * src/locale_body.cpp [6 <= HP aCC <= 6.16]: Silenced bogus HP aCC
        6.16/cadvise warning #20200-D: Potential null pointer dereference.
        * src/locale_name.cpp: Same.
        * locale_combine.cpp: Same.

        STDCXX-879
        * src/locale_combine.cpp (_C_get_body): Used a previously computed
        value of the expected type to   silence HP aCC remark #4271 type
        conversion may lose sign.

Modified:
    stdcxx/branches/4.2.x/src/locale_body.cpp
    stdcxx/branches/4.2.x/src/locale_combine.cpp
    stdcxx/branches/4.2.x/src/locale_name.cpp

Modified: stdcxx/branches/4.2.x/src/locale_body.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/locale_body.cpp?rev=651029&r1=651028&r2=651029&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/locale_body.cpp (original)
+++ stdcxx/branches/4.2.x/src/locale_body.cpp Wed Apr 23 12:49:32 2008
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -65,6 +65,13 @@
 #endif   // _RWSTD_NO_LOCALE_NAME_FMAT
 
 
+#if 6 == _RWSTD_HP_aCC_MAJOR && _RWSTD_HP_aCC_MINOR <= 1600
+   // silence bogus HP aCC 6.16/cadvise warning #20200-D:
+   // Potential null pointer dereference
+#  pragma diag_suppress 20200
+#endif
+
+
 _RWSTD_NAMESPACE (__rw) {
 
 
@@ -819,7 +826,7 @@
             else {
                 // ginit must be volatile to prevent optimizers
                 // from turning this into an infinite loop
-                while (ginit < 1000);
+                while (ginit < 1000) { /* empty */ }
             }
         }
 

Modified: stdcxx/branches/4.2.x/src/locale_combine.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/locale_combine.cpp?rev=651029&r1=651028&r2=651029&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/locale_combine.cpp (original)
+++ stdcxx/branches/4.2.x/src/locale_combine.cpp Wed Apr 23 12:49:32 2008
@@ -23,7 +23,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -41,6 +41,12 @@
 #include "locale_body.h"
 #include "setlocale.h"
 
+#if 6 == _RWSTD_HP_aCC_MAJOR && _RWSTD_HP_aCC_MINOR <= 1600
+   // silence bogus HP aCC 6.16/cadvise warning #20200-D:
+   // Potential null pointer dereference
+#  pragma diag_suppress 20200
+#endif
+
 
 _RWSTD_NAMESPACE (__rw) {
 
@@ -544,7 +550,7 @@
             const _RWSTD_SIZE_T catsize = endcat - pcatnames [i];
 
             // append name followed by the libc "native" separator
-            realname.append (pcatnames [i], endcat - pcatnames [i]);
+            realname.append (pcatnames [i], catsize);
             realname.append (_RWSTD_CAT_SEP, 1);
 
             size += catsize;

Modified: stdcxx/branches/4.2.x/src/locale_name.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/locale_name.cpp?rev=651029&r1=651028&r2=651029&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/locale_name.cpp (original)
+++ stdcxx/branches/4.2.x/src/locale_name.cpp Wed Apr 23 12:49:32 2008
@@ -38,6 +38,12 @@
 
 #include "locale_body.h"
 
+#if 6 == _RWSTD_HP_aCC_MAJOR && _RWSTD_HP_aCC_MINOR <= 1600
+   // silence bogus HP aCC 6.16/cadvise warning #20200-D:
+   // Potential null pointer dereference
+#  pragma diag_suppress 20200
+#endif
+
 
 _RWSTD_NAMESPACE (std) { 
 


Reply via email to