Fix warnings
This commit is contained in:
parent
1c2339ae1d
commit
4bbc830a85
|
@ -279,6 +279,11 @@ static void print_stacktrace(FILE* output, bool demangling, int maxdepth, bool l
|
|||
}
|
||||
}
|
||||
#undef ADDRESSDISPLAYLENGTH
|
||||
#else
|
||||
UNUSED(output);
|
||||
UNUSED(demangling);
|
||||
UNUSED(maxdepth);
|
||||
UNUSED(lowMem);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -341,7 +346,10 @@ static void CppcheckSignalHandler(int signo, siginfo_t * info, void * context)
|
|||
if (uc) {
|
||||
type = (int)uc->uc_mcontext.gregs[REG_ERR] & 2;
|
||||
}
|
||||
#else
|
||||
UNUSED(context);
|
||||
#endif
|
||||
|
||||
const Signalmap_t::const_iterator it=listofsignals.find(signo);
|
||||
const char * const signame = (it==listofsignals.end()) ? "unknown" : it->second.c_str();
|
||||
bool printCallstack=true; // try to print a callstack?
|
||||
|
|
|
@ -388,7 +388,7 @@ static bool checkMinSizes(const std::vector<Library::ArgumentChecks::MinSize> &m
|
|||
parameters.push_back(nullptr);
|
||||
}
|
||||
const MathLib::biguint len = CheckBufferOverrun::countSprintfLength(formatstr, parameters);
|
||||
if (len > arraySize + 2U)
|
||||
if (len > arraySize + 2)
|
||||
error = true;
|
||||
} else {
|
||||
const Token *strtoken = argtok->getValueTokenMaxStrLength();
|
||||
|
|
|
@ -78,4 +78,6 @@ inline static const char *getOrdinalText(int i)
|
|||
return "th";
|
||||
}
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue