diff --git a/rigs/alinco/dxsr8.c b/rigs/alinco/dxsr8.c index e4d5a56fc..82eab0eac 100644 --- a/rigs/alinco/dxsr8.c +++ b/rigs/alinco/dxsr8.c @@ -471,7 +471,7 @@ int dxsr8_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width) return -RIG_EINVAL; } - filter=0; // avoid compiler warings of being possibly uninitialized + filter = 0; // avoid compiler warings of being possibly uninitialized retval = dxsr8_read_num(rig, AL "~RR_NAR" EOM, &filter); if (filter == 0) diff --git a/rigs/aor/aor.c b/rigs/aor/aor.c index 61c3cd253..9b3fb3727 100644 --- a/rigs/aor/aor.c +++ b/rigs/aor/aor.c @@ -467,7 +467,7 @@ int aor_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) if (retval != RIG_OK) { return retval; } strncpy(mdbuf2, mdbuf + 4, 3); /* Extract first 'BW' part */ - mdbuf2[3]='\0'; // in case strnpy produces and un-terminated string + mdbuf2[3] = '\0'; // in case strnpy produces and un-terminated string mdbuf2_len = strlen(mdbuf2); retval = aor_transaction(rig, mdbuf2, mdbuf2_len, NULL, NULL); diff --git a/rigs/drake/drake.c b/rigs/drake/drake.c index c86fb152d..1cc3c5460 100644 --- a/rigs/drake/drake.c +++ b/rigs/drake/drake.c @@ -563,7 +563,7 @@ int drake_set_mem(RIG *rig, vfo_t vfo, int ch) len = sprintf(buf, "C%03d" EOM, ch); - ack_len=0; // fix compile-time warning "possibly uninitialized" + ack_len = 0; // fix compile-time warning "possibly uninitialized" retval = drake_transaction(rig, buf, len, ackbuf, &ack_len); if (ack_len != 2) @@ -853,7 +853,7 @@ int drake_get_chan(RIG *rig, channel_t *chan, int read_only) strncpy(chan->channel_desc, mdbuf + 25, 7); - chan->channel_desc[7]='\0'; // in case strncpy did not terminate the string + chan->channel_desc[7] = '\0'; // in case strncpy did not terminate the string //now put the radio back the way it was //we apparently can't do a read-only channel read diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 3af67ae9b..846acdfdd 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -1314,6 +1314,7 @@ static int icom_set_it_new(RIG *rig, vfo_t vfo, shortfreq_t ts, int set_xit) } #if 0 // why is this here? We have another function to turn it on/off + if (ts == 0) // Turn off both RIT/XIT { if (rig->caps->has_get_func & RIG_FUNC_XIT) @@ -1339,6 +1340,7 @@ static int icom_set_it_new(RIG *rig, vfo_t vfo, shortfreq_t ts, int set_xit) retval = icom_set_func(rig, vfo, set_xit ? RIG_FUNC_XIT : RIG_FUNC_RIT, 1); } + #endif return retval; @@ -2065,7 +2067,7 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) case RIG_VFO_MAIN_A: // we need to select Main before setting VFO case RIG_VFO_MAIN_B: - rig_debug(RIG_DEBUG_VERBOSE, "%s: MainA/B logic\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s: MainA/B logic\n", __func__); retval = icom_transaction(rig, C_SET_VFO, S_MAIN, NULL, 0, ackbuf, &ack_len); @@ -2087,7 +2089,7 @@ int icom_set_vfo(RIG *rig, vfo_t vfo) case RIG_VFO_SUB_A: // we need to select Sub before setting VFO case RIG_VFO_SUB_B: - rig_debug(RIG_DEBUG_VERBOSE, "%s: SubA/B logic\n", __func__); + rig_debug(RIG_DEBUG_VERBOSE, "%s: SubA/B logic\n", __func__); retval = icom_transaction(rig, C_SET_VFO, S_SUB, NULL, 0, ackbuf, &ack_len); diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 6e965a366..3ef057aa5 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -1711,7 +1711,7 @@ int kenwood_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit) if (priv->has_rit2) // if backend shows it has the Set 2 command { char cmd[15]; // length required to make Apple-gcc happy (unicode-proof). - snprintf(cmd, sizeof(cmd)-1, "R%c%05d", rit > 0 ? 'U' : 'D', abs((int)rit)); + snprintf(cmd, sizeof(cmd) - 1, "R%c%05d", rit > 0 ? 'U' : 'D', abs((int)rit)); retval = kenwood_transaction(rig, cmd, NULL, 0); } else diff --git a/tests/ampctld.c b/tests/ampctld.c index 6f99b525a..440c2ce19 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -598,6 +598,7 @@ int main(int argc, char *argv[]) handle_socket(arg); #endif } + // cppcheck-suppress * while (retcode == 0); diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index b660ccc98..ef9314054 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -306,7 +306,7 @@ void hash_sort_by_model_id() /* Delete hash */ void hash_delete_all() { - struct mod_lst *current_model, *tmp=NULL; + struct mod_lst *current_model, *tmp = NULL; HASH_ITER(hh, models, current_model, tmp) { diff --git a/tests/rotctld.c b/tests/rotctld.c index 065a6ea79..c7bfa5e47 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -611,6 +611,7 @@ int main(int argc, char *argv[]) handle_socket(arg); #endif } + // cppcheck-suppress * while (retcode == 0);