Fix cppcheck warning in ar7030p.c

pull/155/head
Michael Black 2019-12-18 17:28:23 -06:00
rodzic efb6edcb52
commit 83856e679d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 28 dodań i 0 usunięć

Wyświetl plik

@ -514,6 +514,13 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rc = -RIG_EINVAL;
}
// this RIG_OK check added to clear cppcheck warnings
// not sure if it's needed but seem like RIG_OK should be expected
// if this debug prints out when things are working need to reexamine
if (rc != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected error?? %s\n", __func__, rigerror(rc));
}
rc = execRoutine(rig, SET_ALL);
if (rc == RIG_OK) { rc = lockRx(rig, LOCK_0); }
@ -564,6 +571,13 @@ static int ar7030p_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
break;
}
// this RIG_OK check added to clear cppcheck warnings
// not sure if it's needed but seem like RIG_OK should be expected
// if this debug prints out when things are working need to reexamine
if (rc != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected error?? %s\n", __func__, rigerror(rc));
}
rc = lockRx(rig, LOCK_0);
}
@ -631,6 +645,13 @@ static int ar7030p_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
}
}
// this RIG_OK check added to clear cppcheck warnings
// not sure if it's needed but seem like RIG_OK should be expected
// if this debug prints out when things are working need to reexamine
if (rc != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected error?? %s\n", __func__, rigerror(rc));
}
rc = lockRx(rig, LOCK_0);
}
@ -968,6 +989,13 @@ static int ar7030p_set_level(RIG *rig, vfo_t vfo, setting_t level,
break;
}
// this RIG_OK check added to clear cppcheck warnings
// not sure if it's needed but seem like RIG_OK should be expected
// if this debug prints out when things are working need to reexamine
if (rc != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected error?? %s\n", __func__, rigerror(rc));
}
rc = lockRx(rig, LOCK_0);
}