Clean up mingw compiler warning for tones.h

https://github.com/Hamlib/Hamlib/issues/659
pull/691/head
Mike Black W9MDB 2021-04-29 17:16:51 -05:00
rodzic 697a194752
commit 604516ed8f
3 zmienionych plików z 10 dodań i 12 usunięć

Wyświetl plik

@ -1219,7 +1219,8 @@ int tmd710_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
if (fo_struct.dcs)
{
*code = common_dcs_list[fo_struct.dcs_val];
tone_t *dcs_list = common_dcs_list;
*code = dcs_list[fo_struct.dcs_val];
}
else
{
@ -1234,9 +1235,10 @@ static int tmd710_find_dcs_index(tone_t code, uint32_t *dcs_index)
int i = 0;
// we only allow exact matches here
while (code != common_dcs_list[i])
tone_t *dcs_list = common_dcs_list;
while (code != dcs_list[i])
{
if (common_dcs_list[i] == 0)
if (dcs_list[i] == 0)
{
return -RIG_EINVAL;
}
@ -1889,7 +1891,8 @@ int tmd710_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
if (me_struct.dcs)
{
chan->dcs_sql = common_dcs_list[me_struct.dcs_val];
tone_t *dcs_list = common_dcs_list;
chan->dcs_sql = dcs_list[me_struct.dcs_val];
}
else
{

Wyświetl plik

@ -37,12 +37,10 @@
2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \
0,
#if 1
static const tone_t static_full_ctcss_list[] =
{
FULL_CTCSS_LIST
};
#endif
#define FULL_CTCSS_LIST_COUNT 52
@ -62,12 +60,10 @@ static const tone_t static_full_ctcss_list[] =
2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, \
0,
#if 1
static const tone_t static_common_ctcss_list[] =
{
COMMON_CTCSS_LIST
};
#endif
#define COMMON_CTCSS_LIST_COUNT 50
@ -87,12 +83,10 @@ static const tone_t static_common_ctcss_list[] =
662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \
0,
#if 1
static const tone_t static_common_dcs_list[] =
{
COMMON_DCS_LIST
};
#endif
#define COMMON_DCS_LIST_COUNT 104
@ -111,12 +105,10 @@ static const tone_t static_common_dcs_list[] =
662, 664, 703, 712, 723, 731, 732, 734, 743, 754, \
0,
#if 1
static const tone_t static_full_dcs_list[] =
{
FULL_DCS_LIST
};
#endif
#define FULL_DCS_LIST_COUNT 106

Wyświetl plik

@ -4344,6 +4344,9 @@ declare_proto_rig(dump_state)
fprintf(fout, "has_get_freq=%d\n", rig->caps->get_freq != NULL);
fprintf(fout, "has_set_conf=%d\n", rig->caps->set_conf != NULL);
fprintf(fout, "has_get_conf=%d\n", rig->caps->get_conf != NULL);
fprintf(fout, "has_set_parm=%d\n", rig->caps->set_parm != NULL);
fprintf(fout, "has_get_parm=%d\n", rig->caps->get_parm != NULL);
fprintf(fout, "parm_gran=0x%x\n", rig->caps->parm_gran);
// for the future
// fprintf(fout, "has_set_trn=%d\n", rig->caps->set_trn != NULL);
// fprintf(fout, "has_get_trn=%d\n", rig->caps->get_trn != NULL);