Hi - The variable 't1' on line 10188 of cxa_demangle.cpp is uninitialized which generates the following warning when building libcxxabi with clang++ -Wall:
src/libcxxabi/src/cxa_demangle.cpp:10263:18: warning: variable 't1' is
used uninitialized whenever switch case is taken
[-Wsometimes-uninitialized]
case 'U':
^~~
src/libcxxabi/src/cxa_demangle.cpp:10338:17: note: uninitialized use occurs here
if (t1 == t0 || t1 == last)
^~
src/libcxxabi/src/cxa_demangle.cpp:10188:27: note: initialize the
variable 't1' to silence this warning
const char* t1;
^
= nullptr
I've attached a patch that initializes 't1' to NULL. This is also the
first patch I've generated from a tree based on the LLVM git mirrors
rather than from svn, so I hope it is OK.
Thanks,
Andrew
libcxxabi.demangle.uninit.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
