mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2026-01-01 22:25:42 +03:00
Fix/Suppress remaining Cppcheck warnings (#291)
Fix/suppress the following cppcheck warnings: * arithOperationsOnVoidPointer * uninitMember * const* * shadowVariable * assignmentIntegerToAddress * containerOutOfBounds * pointer-related warnings in Ragel source * missingOverride * memleak * knownConditionTrueFalse * noExplicitConstructor * invalidPrintfArgType_sint * useStlAlgorithm * cstyleCast * clarifyCondition * VSX-related cstyleCast * unsignedLessThanZero Furthermore, we added a suppression list to be used, which also includes the following: * missingIncludeSystem * missingInclude * unmatchedSuppression
This commit is contained in:
committed by
GitHub
parent
a8e43a4c0b
commit
02fc8e3b1c
@@ -105,6 +105,7 @@ void writeSentinel(mpv_puffette *out) {
|
||||
static
|
||||
void writeDeadPoint(mpv_kilopuff *out, const vector<raw_puff> &puffs) {
|
||||
for (const auto &puff : puffs) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
if (puff.unbounded) { /* mpv can never die */
|
||||
out->dead_point = MPV_DEAD_VALUE;
|
||||
return;
|
||||
@@ -313,6 +314,7 @@ static
|
||||
const mpv_counter_info &findCounter(const vector<mpv_counter_info> &counters,
|
||||
u32 i) {
|
||||
for (const auto &counter : counters) {
|
||||
// cppcheck-suppress useStlAlgorithm
|
||||
if (i >= counter.kilo_begin && i < counter.kilo_end) {
|
||||
return counter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user