pull/369/head
Michael Black W9MDB 2020-09-01 09:06:46 -05:00
rodzic 3ef3a73b79
commit e459d4edc2
8 zmienionych plików z 12 dodań i 8 usunięć

Wyświetl plik

@ -471,7 +471,7 @@ int dxsr8_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return -RIG_EINVAL; 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); retval = dxsr8_read_num(rig, AL "~RR_NAR" EOM, &filter);
if (filter == 0) if (filter == 0)

Wyświetl plik

@ -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; } if (retval != RIG_OK) { return retval; }
strncpy(mdbuf2, mdbuf + 4, 3); /* Extract first 'BW' part */ 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); mdbuf2_len = strlen(mdbuf2);
retval = aor_transaction(rig, mdbuf2, mdbuf2_len, NULL, NULL); retval = aor_transaction(rig, mdbuf2, mdbuf2_len, NULL, NULL);

Wyświetl plik

@ -563,7 +563,7 @@ int drake_set_mem(RIG *rig, vfo_t vfo, int ch)
len = sprintf(buf, "C%03d" EOM, 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); retval = drake_transaction(rig, buf, len, ackbuf, &ack_len);
if (ack_len != 2) 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); 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 //now put the radio back the way it was
//we apparently can't do a read-only channel read //we apparently can't do a read-only channel read

Wyświetl plik

@ -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 0 // why is this here? We have another function to turn it on/off
if (ts == 0) // Turn off both RIT/XIT if (ts == 0) // Turn off both RIT/XIT
{ {
if (rig->caps->has_get_func & RIG_FUNC_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 = retval =
icom_set_func(rig, vfo, set_xit ? RIG_FUNC_XIT : RIG_FUNC_RIT, 1); icom_set_func(rig, vfo, set_xit ? RIG_FUNC_XIT : RIG_FUNC_RIT, 1);
} }
#endif #endif
return retval; 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_A: // we need to select Main before setting VFO
case RIG_VFO_MAIN_B: 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, retval = icom_transaction(rig, C_SET_VFO, S_MAIN, NULL, 0,
ackbuf, &ack_len); 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_A: // we need to select Sub before setting VFO
case RIG_VFO_SUB_B: 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, retval = icom_transaction(rig, C_SET_VFO, S_SUB, NULL, 0,
ackbuf, &ack_len); ackbuf, &ack_len);

Wyświetl plik

@ -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 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). 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); retval = kenwood_transaction(rig, cmd, NULL, 0);
} }
else else

Wyświetl plik

@ -598,6 +598,7 @@ int main(int argc, char *argv[])
handle_socket(arg); handle_socket(arg);
#endif #endif
} }
// cppcheck-suppress * // cppcheck-suppress *
while (retcode == 0); while (retcode == 0);

Wyświetl plik

@ -306,7 +306,7 @@ void hash_sort_by_model_id()
/* Delete hash */ /* Delete hash */
void hash_delete_all() 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) HASH_ITER(hh, models, current_model, tmp)
{ {

Wyświetl plik

@ -611,6 +611,7 @@ int main(int argc, char *argv[])
handle_socket(arg); handle_socket(arg);
#endif #endif
} }
// cppcheck-suppress * // cppcheck-suppress *
while (retcode == 0); while (retcode == 0);