Fix compiler warnings

pull/892/head
Mikael Nousiainen 2021-12-20 09:41:20 +02:00
rodzic 0fe723d6fa
commit 99b9893430
1 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -301,7 +301,7 @@ static int jst145_open(RIG *rig)
pbwidth_t width; pbwidth_t width;
struct jst145_priv_data *priv = rig->state.priv; struct jst145_priv_data *priv = rig->state.priv;
retval = write_block(&rig->state.rigport, "H1\r", 3); retval = write_block(&rig->state.rigport, (unsigned char *) "H1\r", 3);
if (retval != RIG_OK) if (retval != RIG_OK)
{ {
@ -320,7 +320,7 @@ static int jst145_open(RIG *rig)
static int jst145_close(RIG *rig) static int jst145_close(RIG *rig)
{ {
return write_block(&rig->state.rigport, "H0\r", 3); return write_block(&rig->state.rigport, (unsigned char *) "H0\r", 3);
} }
static int jst145_set_vfo(RIG *rig, vfo_t vfo) static int jst145_set_vfo(RIG *rig, vfo_t vfo)
@ -328,7 +328,7 @@ static int jst145_set_vfo(RIG *rig, vfo_t vfo)
char cmd[MAX_LEN]; char cmd[MAX_LEN];
snprintf(cmd, sizeof(cmd), "F%c\r", vfo == RIG_VFO_A ? 'A' : 'B'); snprintf(cmd, sizeof(cmd), "F%c\r", vfo == RIG_VFO_A ? 'A' : 'B');
return write_block(&rig->state.rigport, cmd, strlen(cmd)); return write_block(&rig->state.rigport, (unsigned char *) cmd, strlen(cmd));
} }
static int jst145_get_vfo(RIG *rig, vfo_t *vfo) static int jst145_get_vfo(RIG *rig, vfo_t *vfo)
@ -380,7 +380,7 @@ static int jst145_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
priv->freqA = freq; priv->freqA = freq;
} }
return write_block(&rig->state.rigport, freqbuf, strlen(freqbuf)); return write_block(&rig->state.rigport, (unsigned char *) freqbuf, strlen(freqbuf));
} }
@ -442,7 +442,7 @@ static int jst145_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
return -RIG_EINVAL; return -RIG_EINVAL;
} }
retval = write_block(&rig->state.rigport, modestr, strlen(modestr)); retval = write_block(&rig->state.rigport, (unsigned char *) modestr, strlen(modestr));
if (retval != RIG_OK) if (retval != RIG_OK)
{ {
@ -504,10 +504,10 @@ static int jst145_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
switch (level) switch (level)
{ {
case RIG_LEVEL_AGC: case RIG_LEVEL_AGC: {
return write_block(&rig->state.rigport, char *cmd = val.i == RIG_AGC_SLOW ? "G0\r" : (val.i == RIG_AGC_FAST ? "G1\r" : "G2\r");
val.i == RIG_AGC_SLOW ? "G0\r" : return write_block(&rig->state.rigport, (unsigned char *) cmd, 3);
(val.i == RIG_AGC_FAST ? "G1\r" : "G2\r"), 3); }
default: default:
return -RIG_EINVAL; return -RIG_EINVAL;
@ -522,7 +522,7 @@ static int jst145_set_mem(RIG *rig, vfo_t vfo, int ch)
sprintf(membuf, "C%03d\r", ch); sprintf(membuf, "C%03d\r", ch);
return write_block(&rig->state.rigport, membuf, strlen(membuf)); return write_block(&rig->state.rigport, (unsigned char *) membuf, strlen(membuf));
} }
static int jst145_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op) static int jst145_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
@ -530,7 +530,7 @@ static int jst145_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
switch (op) switch (op)
{ {
case RIG_OP_FROM_VFO: case RIG_OP_FROM_VFO:
return write_block(&rig->state.rigport, "E1\r", 3); return write_block(&rig->state.rigport, (unsigned char *) "E1\r", 3);
default: default:
return -RIG_EINVAL; return -RIG_EINVAL;
@ -546,7 +546,7 @@ static int jst145_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
rig_debug(RIG_DEBUG_TRACE, "%s: entered\n", __func__); rig_debug(RIG_DEBUG_TRACE, "%s: entered\n", __func__);
snprintf(cmd, sizeof(cmd), "X%c\r", ptt ? '1' : '0'); snprintf(cmd, sizeof(cmd), "X%c\r", ptt ? '1' : '0');
priv->ptt = ptt; priv->ptt = ptt;
return write_block(&rig->state.rigport, cmd, strlen(cmd)); return write_block(&rig->state.rigport, (unsigned char *) cmd, strlen(cmd));
} }
static int jst145_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt) static int jst145_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)