Author: vitek Date: Tue Aug 5 10:52:53 2008 New Revision: 682835 URL: http://svn.apache.org/viewvc?rev=682835&view=rev Log: 2008-08-05 Travis Vitek <[EMAIL PROTECTED]>
* tests/regress/21.string.append.stdcxx-438.cpp: Check pointer to silence HP aCC 6/cadvise warning #20035-D. * tests/support/18.exception.cpp (induce_exception): Provide deallocation code to avoid HP aCC 6/cadvise warning #20201-D. Modified: stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp stdcxx/branches/4.2.x/tests/support/18.exception.cpp Modified: stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp?rev=682835&r1=682834&r2=682835&view=diff ============================================================================== --- stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp (original) +++ stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp Tue Aug 5 10:52:53 2008 @@ -39,6 +39,9 @@ void* operator new (std::size_t n) throw (std::bad_alloc) { void* const ptr = std::malloc (n + sizeof n); + if (!ptr) + return 0; + std::memset (ptr, -1, n); *(std::size_t*)ptr = n; return (std::size_t*)ptr + 1; Modified: stdcxx/branches/4.2.x/tests/support/18.exception.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/support/18.exception.cpp?rev=682835&r1=682834&r2=682835&view=diff ============================================================================== --- stdcxx/branches/4.2.x/tests/support/18.exception.cpp (original) +++ stdcxx/branches/4.2.x/tests/support/18.exception.cpp Tue Aug 5 10:52:53 2008 @@ -803,7 +803,9 @@ // try to allocate a huge amount of memory to induce bad_alloc const std::size_t huge_amount = _RWSTD_SIZE_MAX - 4096; - ::operator new (huge_amount); + void * const p = ::operator new (huge_amount); + + ::operator delete (p); # ifndef _RWSTD_NO_SETRLIMIT # if !defined (__HP_aCC)