Fix warning coming from system headers. Add a newline in error messages that will likely never be emitted...

This commit is contained in:
Steve Checkoway
2006-10-13 05:11:54 +00:00
parent 933c87eb21
commit 3e913de2d2
@@ -33,7 +33,9 @@ void BacktraceNames::Demangle()
free(f); free(f);
} }
#elif defined(HAVE_CXA_DEMANGLE) #elif defined(HAVE_CXA_DEMANGLE)
#include <cxxabi.h> namespace abi {
extern "C" char *__cxa_demangle( const char *mangled_name, char *buf, size_t *n, int *status);
}
void BacktraceNames::Demangle() void BacktraceNames::Demangle()
{ {
@@ -42,7 +44,7 @@ void BacktraceNames::Demangle()
return; return;
int status = 0; int status = 0;
char *name = abi::__cxa_demangle( Symbol, 0, 0, &status ); char *name = abi::__cxa_demangle( Symbol, NULL, NULL, &status );
if( name ) if( name )
{ {
Symbol = name; Symbol = name;
@@ -62,7 +64,7 @@ void BacktraceNames::Demangle()
fprintf( stderr, "Invalid arguments.\n" ); fprintf( stderr, "Invalid arguments.\n" );
break; break;
default: default:
fprintf( stderr, "Unexpected __cxa_demangle status: %i", status ); fprintf( stderr, "Unexpected __cxa_demangle status: %i\n", status );
break; break;
} }
} }