Author: sebor Date: Thu Mar 20 13:52:19 2008 New Revision: 639452 URL: http://svn.apache.org/viewvc?rev=639452&view=rev Log: 2008-03-20 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-750 * util/aliases.cpp (get_installed_locales): Replaced malloc() with a new expression to avoid having to check the returned value and to silence HP cadvise warning #20200-D: Potential null pointer dereference is detected. Changed the type of locals to silence HP aCC 6.16 remark #4298-D: addition result could be truncated before cast to bigger sized type. Modified: stdcxx/trunk/util/aliases.cpp Modified: stdcxx/trunk/util/aliases.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/aliases.cpp?rev=639452&r1=639451&r2=639452&view=diff ============================================================================== --- stdcxx/trunk/util/aliases.cpp (original) +++ stdcxx/trunk/util/aliases.cpp Thu Mar 20 13:52:19 2008 @@ -543,12 +543,12 @@ { static char* slocname = 0; - static int size = 0; // the number of elements in the array - static int total_size = 5120; // the size of the array + static std::size_t size = 0; // number of elements in array + static std::size_t total_size = 5120; // the size of the array // allocate first time through if (!slocname) { - slocname = (char*)std::malloc (16384); + slocname = new char [16384]; *slocname = '\0'; }