mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Ran format.py after writing unit tests for and fixing bugs in it (#239)
This commit is contained in:
committed by
Peter Johnson
parent
ac9b6f7b18
commit
659dbef751
@@ -10,6 +10,8 @@
|
||||
#include <cxxabi.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
@@ -182,7 +184,7 @@ static std::string demangle(char const* mangledSymbol) {
|
||||
size_t length;
|
||||
int32_t status;
|
||||
|
||||
if (sscanf(mangledSymbol, "%*[^(]%*[(]%255[^)+]", buffer)) {
|
||||
if (std::sscanf(mangledSymbol, "%*[^(]%*[(]%255[^)+]", buffer)) {
|
||||
char* symbol = abi::__cxa_demangle(buffer, nullptr, &length, &status);
|
||||
if (status == 0) {
|
||||
return symbol;
|
||||
@@ -214,7 +216,7 @@ std::string GetStackTrace(int offset) {
|
||||
}
|
||||
}
|
||||
|
||||
free(mangledSymbols);
|
||||
std::free(mangledSymbols);
|
||||
|
||||
return trace.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user