remove some cppcheck warnings

This commit is contained in:
Philippe Teuwen 2019-06-12 06:41:23 -07:00
commit 1ebfa897c8
24 changed files with 145 additions and 146 deletions

View file

@ -935,12 +935,12 @@ static int CmdUndec(const char *Cmd) {
//by marshmellow
//shift graph zero up or down based on input + or -
static int CmdGraphShiftZero(const char *Cmd) {
int shift = 0, shiftedVal;
int shift = 0;
//set options from parameters entered with the command
sscanf(Cmd, "%i", &shift);
for (size_t i = 0; i < GraphTraceLen; i++) {
shiftedVal = GraphBuffer[i] + shift;
int shiftedVal = GraphBuffer[i] + shift;
if (shiftedVal > 127)
shiftedVal = 127;