[CppAD] newptr may be used uninitialized
Michael Tautschnig
tautschn at model.in.tum.de
Fri Jun 2 02:28:18 EDT 2006
Hi!
gcc -Wall -pedantic reports an uninitialized use of newptr in TrackNewDel.h,
line 307. The following simple patch solves this issue:
--- trunk/CppAD/TrackNewDel.h (revision 421)
+++ trunk/CppAD/TrackNewDel.h (working copy)
@@ -304,7 +304,7 @@
Type *oldptr )
{
// try to allocate the new memrory
- Type *newptr;
+ Type *newptr = 0;
try
{ newptr = new Type[len];
}
Thanks,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://list.coin-or.org/pipermail/cppad/attachments/20060602/19ea8a57/attachment.bin
More information about the CppAD
mailing list