Fix cppcheck styles

pull/1354/head
Mike Black W9MDB 2023-08-02 22:47:36 -05:00
rodzic d03affebea
commit 3eafbcad11
4 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -938,7 +938,7 @@ int aor_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
*/
int aor_set_mem(RIG *rig, vfo_t vfo, int ch)
{
struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
const struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
char membuf[BUFSZ];
int mem_num;
char bank_base;
@ -972,7 +972,7 @@ int aor_set_mem(RIG *rig, vfo_t vfo, int ch)
*/
int aor_get_mem(RIG *rig, vfo_t vfo, int *ch)
{
struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
const struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
int mem_len, retval;
char membuf[BUFSZ];
@ -1239,7 +1239,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep,
int aor_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
{
struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
const struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
char aorcmd[BUFSZ];
int chan_len;
char chanbuf[BUFSZ];
@ -1345,7 +1345,7 @@ int aor_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only)
int aor_get_chan_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
{
struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
const struct aor_priv_caps *priv = (struct aor_priv_caps *)rig->caps->priv;
int i, j, retval;
chan_t *chan_list = rig->state.chan_list;
channel_t *chan;

Wyświetl plik

@ -356,7 +356,7 @@ int ar3030_set_vfo(RIG *rig, vfo_t vfo)
int ar3030_get_vfo(RIG *rig, vfo_t *vfo)
{
struct ar3030_priv_data *priv = (struct ar3030_priv_data *)rig->state.priv;
const struct ar3030_priv_data *priv = (struct ar3030_priv_data *)rig->state.priv;
*vfo = priv->curr_vfo;

Wyświetl plik

@ -73,7 +73,7 @@ static int rxr_writeByte(RIG *rig, unsigned char c)
static int rxr_readByte(RIG *rig)
{
unsigned char response[1];
unsigned char buf[] = {0x71}; // Read command
const unsigned char buf[] = {0x71}; // Read command
int retval;
retval = write_block(&rig->state.rigport, buf, 1);
@ -190,7 +190,7 @@ static void Execute_Routine_2_1(RIG *rig, char mp, char ad, int numSteps)
}
#endif
// Routine 3 Set passband Setup all IF parameters from filter, pbsval and bfoval bytes.
static void Execute_Routine_3_1(RIG *rig, char mp, char ad, int numSteps)
static void Execute_Routine_3_1(RIG *rig, char mp, char ad, unsigned int numSteps)
{
setLock(rig, 1); //Set Lock Level
setMemPtr(rig, mp, ad); //page, address
@ -269,7 +269,7 @@ static void Execute_Routine_6_1(RIG *rig, char mp, char ad, int numSteps)
static int Execute_Routine_14(RIG *rig)
{
unsigned char response[1];
unsigned char buf[] = {0x2e}; // Read command
const unsigned char buf[] = {0x2e}; // Read command
int retval;
retval = write_block(&rig->state.rigport, buf, 1);
@ -488,7 +488,7 @@ static int ar7030_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
setMemPtr(rig, 0, 0x38);
if ((*width = BCD_To_int(rig, rxr_readByte(rig)) * 100) < 0)
if ((*width = (pbwidth_t)BCD_To_int(rig, rxr_readByte(rig)) * 100) < 0)
{
return -RIG_EINVAL;
}

Wyświetl plik

@ -1612,6 +1612,7 @@ static int ar7030p_get_func(RIG *rig, vfo_t vfo, setting_t func,
{
assert(NULL != rig);
assert(NULL != status);
*status = 0;
return (-RIG_ENIMPL);
}
@ -1640,7 +1641,7 @@ static int ar7030p_get_channel(RIG *rig, vfo_t vfo, channel_t *chan,
unsigned char *p = NULL;
int ch;
struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
const channel_t *curr = priv->curr;
assert(NULL != chan);