Closed teaalltr closed 3 years ago
https://github.com/lewisxhe/AXP202X_Library/blob/c5219709b4c91145402b55d16a5571073980c5be/src/axp20x.cpp#L1807
Line 1650, val |= params[vol];
val |= params[vol];
CPPCHECK says: Cppcheck: (warning) arrayIndexOutOfBoundsCond: Either the condition 'vol>sizeof(params)/sizeof(params[0])' is redundant or the array 'params[8]' is accessed at index 8, which is out of bounds.
Cppcheck: (warning) arrayIndexOutOfBoundsCond: Either the condition 'vol>sizeof(params)/sizeof(params[0])' is redundant or the array 'params[8]' is accessed at index 8, which is out of bounds.
Before access, the array range has been restricted.
https://github.com/lewisxhe/AXP202X_Library/blob/c5219709b4c91145402b55d16a5571073980c5be/src/axp20x.cpp#L1802
https://github.com/lewisxhe/AXP202X_Library/blob/c5219709b4c91145402b55d16a5571073980c5be/src/axp20x.cpp#L1807
Line 1650,
val |= params[vol];
CPPCHECK says:
Cppcheck: (warning) arrayIndexOutOfBoundsCond: Either the condition 'vol>sizeof(params)/sizeof(params[0])' is redundant or the array 'params[8]' is accessed at index 8, which is out of bounds.