Skip to content

Commit 269d2a4

Browse files
committed
fix github warning
1 parent 563c7b4 commit 269d2a4

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/analyzerinfo.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "utils.h"
2525

2626
#include <array>
27-
#include <cstdlib>
2827
#include <cstring>
2928
#include <exception>
3029
#include <iostream>
@@ -80,9 +79,11 @@ void AnalyzerInformation::writeFilesTxt(const std::string &buildDir, const std::
8079
const std::string::size_type dotA = info.afile.rfind(".a");
8180
if (dotA != std::string::npos) {
8281
const std::string base = info.afile.substr(0, dotA);
83-
const unsigned int n = std::strtoul(info.afile.c_str() + dotA + 2, nullptr, 10);
84-
unsigned int &count = fileCount[base];
85-
count = std::max(count, n);
82+
unsigned int n = 0;
83+
if (strToInt(info.afile.substr(dotA + 2), n)) {
84+
unsigned int &count = fileCount[base];
85+
count = std::max(count, n);
86+
}
8687
}
8788
}
8889
}

0 commit comments

Comments
 (0)