Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 42859 invoked from network); 20 Mar 2008 20:52:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2008 20:52:44 -0000 Received: (qmail 95056 invoked by uid 500); 20 Mar 2008 20:52:42 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 95030 invoked by uid 500); 20 Mar 2008 20:52:42 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 95020 invoked by uid 99); 20 Mar 2008 20:52:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2008 13:52:42 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2008 20:52:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AC7721A983A; Thu, 20 Mar 2008 13:52:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r639452 - /stdcxx/trunk/util/aliases.cpp Date: Thu, 20 Mar 2008 20:52:21 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080320205221.AC7721A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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'; }