Merge branch 'develop' into wip-cppcheck271-part2

This commit is contained in:
g. economou
2024-05-17 11:08:09 +03:00
committed by GitHub
211 changed files with 3167 additions and 2125 deletions

View File

@@ -227,7 +227,7 @@ struct BenchmarkSigs {
/** Process command-line arguments. Prints usage and exits on error. */
static
void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
UNUSED unique_ptr<Grey> &grey) {
UNUSED const unique_ptr<Grey> &grey) {
const char options[] = "-b:c:Cd:e:E:G:hHi:n:No:p:PsS:Vw:z:"
#if defined(HAVE_DECL_PTHREAD_SETAFFINITY_NP)
"T:" // add the thread flag
@@ -465,7 +465,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
/** Start the global timer. */
static
void startTotalTimer(ThreadContext *ctx) {
void startTotalTimer(const ThreadContext *ctx) {
if (ctx->num != 0) {
return; // only runs in the first thread
}
@@ -474,7 +474,7 @@ void startTotalTimer(ThreadContext *ctx) {
/** Stop the global timer and calculate totals. */
static
void stopTotalTimer(ThreadContext *ctx) {
void stopTotalTimer(const ThreadContext *ctx) {
if (ctx->num != 0) {
return; // only runs in the first thread
}
@@ -1013,9 +1013,9 @@ int HS_CDECL main(int argc, char *argv[]) {
if (sigSets.empty()) {
SignatureSet sigs;
sigs.reserve(exprMapTemplate.size());
for (auto i : exprMapTemplate | map_keys) {
sigs.push_back(i);
}
const auto &i = exprMapTemplate | map_keys;
std::copy(begin(i), end(i), std::back_inserter(sigs));
sigSets.emplace_back(exprPath, std::move(sigs));
}