Fix cppcheck warnings in ra37xx.c

pull/155/head
Michael Black 2019-12-08 15:50:47 -06:00
rodzic dc14ae10d4
commit 1db7580cf2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -341,7 +341,7 @@ int ra37xx_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
char freqbuf[BUFSZ];
int freq_len;
freq_len = sprintf(freqbuf, "F%ld", (unsigned long)freq);
freq_len = sprintf(freqbuf, "F%lu", (unsigned long)freq);
if (freq_len < 0)
{
@ -377,7 +377,7 @@ int ra37xx_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
int ra37xx_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
//struct ra37xx_priv_data *priv = (struct ra37xx_priv_data*)rig->state.priv;
int ra_mode, widthtype, widthnum;
int ra_mode, widthtype, widthnum=0;
char buf[BUFSZ];
switch (mode)
@ -407,19 +407,19 @@ int ra37xx_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
width = rig_passband_normal(rig, mode);
}
rig_debug(RIG_DEBUG_TRACE, "%s: widthtype = %i, widthnum = %i not implemented\n", __func__, widthtype, widthnum);
#ifdef XXREMOVEDXX
widthtype = 0; /* FIXME: no bandwidth for now */
widthnum = 0;
/* width set using 'B', QBCON must be queried firsthand */
#endif
#if 0
#ifdef XXREMOVEDXX
sprintf(buf, "M%d;B%d,%d", ra_mode, widthtype, widthnum);
#else
sprintf(buf, "M%d", ra_mode);
#endif
rig_debug(RIG_DEBUG_TRACE, "%s: widthtype = %i, widthnum = %i\n", __func__,
widthtype, widthnum);
return ra37xx_transaction(rig, buf, NULL, NULL);
}