Remove set but unused variable errors in icom.

Hamlib-1.2.15
Nate Bargmann 2011-08-24 22:37:54 -05:00
rodzic f3fe7bffc8
commit e78f9be94e
4 zmienionych plików z 1 dodań i 67 usunięć

Wyświetl plik

@ -549,8 +549,6 @@ const struct rig_caps ic746pro_caps = {
*/
static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char epbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
int ack_len, ep_len, val_len;
int ep_cmd = C_CTL_MEM;
@ -558,9 +556,6 @@ static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val)
int icom_val = 0;
int retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
ep_len = 0; /* 0 implies BCD data */
val_len = 1;
@ -607,8 +602,6 @@ static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val)
*/
static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
const struct confparams *cfp;
unsigned char resbuf[MAXFRAMELEN];
@ -619,9 +612,6 @@ static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val)
int ep_cmd = C_CTL_MEM;
int ep_sc; /* Subcommand in $1A $05xx */
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
switch(token) {
case TOK_SSBBASS:
ep_sc = S_MEM_SBASS ;

Wyświetl plik

@ -582,8 +582,6 @@ const struct rig_caps ic756pro2_caps = {
*/
static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char epbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
int ack_len, ep_len, val_len;
int ep_cmd = C_CTL_MEM;
@ -591,9 +589,6 @@ static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val)
int icom_val = 0;
int retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
ep_len = 0; /* 0 implies BCD data */
val_len = 1;
@ -651,8 +646,6 @@ static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val)
*/
static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
const struct confparams *cfp;
unsigned char resbuf[MAXFRAMELEN];
@ -663,9 +656,6 @@ static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val)
int ep_cmd = C_CTL_MEM;
int ep_sc; /* Subcommand in $1A $05xx */
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
switch(token) {
case TOK_SSBBASS:
ep_sc = S_MEM_SBASS ;

Wyświetl plik

@ -662,14 +662,9 @@ int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
*/
int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char modebuf[MAXFRAMELEN];
int mode_len, retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
retval = icom_transaction (rig, C_RD_MODE, -1, NULL, 0,
modebuf, &mode_len);
if (retval != RIG_OK)
@ -768,7 +763,6 @@ int icom_set_vfo(RIG *rig, vfo_t vfo)
*/
int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char lvlbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
int ack_len=sizeof(ackbuf), lvl_len;
@ -777,7 +771,6 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int i, retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
/*
@ -980,7 +973,6 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
*/
int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char lvlbuf[MAXFRAMELEN], lvl2buf[MAXFRAMELEN];
int lvl_len, lvl2_len;
@ -990,7 +982,6 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
int retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
lvl2_len = 0;
@ -2820,15 +2811,11 @@ int icom_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
*/
int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char scanbuf[MAXFRAMELEN];
unsigned char ackbuf[MAXFRAMELEN];
int scan_len, ack_len=sizeof(ackbuf), retval;
int scan_cn, scan_sc;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
scan_len = 0;
scan_cn = C_CTL_SCAN;

Wyświetl plik

@ -137,15 +137,10 @@ int optoscan_close(RIG *rig)
*/
const char* optoscan_get_info(RIG *rig)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char ackbuf[16];
int ack_len, retval;
static char info[64];
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
/* select LOCAL control */
retval = icom_transaction (rig, C_CTL_MISC, S_OPTO_RDID,
NULL, 0, ackbuf, &ack_len);
@ -173,12 +168,9 @@ const char* optoscan_get_info(RIG *rig)
*/
int optoscan_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
{
const struct rig_caps *caps;
unsigned char tonebuf[MAXFRAMELEN];
int tone_len, retval;
caps = rig->caps;
retval = icom_transaction(rig, C_CTL_MISC, S_OPTO_RDCTCSS, NULL, 0,
tonebuf, &tone_len);
if (retval != RIG_OK)
@ -205,12 +197,9 @@ int optoscan_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
*/
int optoscan_get_dcs_code(RIG * rig, vfo_t vfo, tone_t *code)
{
const struct rig_caps *caps;
unsigned char tonebuf[MAXFRAMELEN];
int tone_len, retval;
caps = rig->caps;
retval = icom_transaction(rig, C_CTL_MISC, S_OPTO_RDDCS, NULL, 0,
tonebuf, &tone_len);
if (retval != RIG_OK)
@ -232,13 +221,11 @@ int optoscan_get_dcs_code(RIG * rig, vfo_t vfo, tone_t *code)
int optoscan_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
{
const struct rig_caps *caps;
unsigned char dtmfbuf[MAXFRAMELEN],digit;
int len, retval, digitpos;
unsigned char xlate[] = {'0','1','2','3','4','5','6',
'7','8','9','A','B','C','D',
'*','#'};
caps = rig->caps;
digitpos=0;
do {
@ -282,14 +269,12 @@ int optoscan_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
int optoscan_set_ext_parm(RIG *rig, token_t token, value_t val)
{
unsigned char epbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
int ack_len, val_len;
int ack_len;
int retval,subcode;
memset(epbuf,0,MAXFRAMELEN);
memset(ackbuf,0,MAXFRAMELEN);
val_len = 1;
switch(token) {
case TOK_TAPECNTL:
if( val.i == 0 ) {
@ -385,17 +370,12 @@ int optoscan_get_ext_parm(RIG *rig, token_t token, value_t *val)
*/
int optoscan_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
{
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char lvlbuf[MAXFRAMELEN], ackbuf[MAXFRAMELEN];
int ack_len;
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
int icom_val;
int retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
memset(lvlbuf,0,MAXFRAMELEN);
/*
@ -442,8 +422,6 @@ int optoscan_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int optoscan_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
struct optostat status_block;
struct icom_priv_data *priv;
struct rig_state *rs;
unsigned char lvlbuf[MAXFRAMELEN];
int lvl_len;
int lvl_cn, lvl_sc; /* Command Number, Subcommand */
@ -451,9 +429,6 @@ int optoscan_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
int cmdhead;
int retval;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
if( level != RIG_LEVEL_AF )
{
switch (level) {
@ -674,18 +649,10 @@ static int optoscan_get_status_block(RIG *rig, struct optostat *status_block)
static int optoscan_send_freq(RIG *rig,pltstate_t *state)
{
unsigned char buff[OPTO_BUFF_SIZE];
struct icom_priv_data *priv;
struct rig_state *rs;
const hamlib_port_t *port;
int fd;
char md,pd;
freq_t freq;
rmode_t mode;
port = &(rig->state.rigport);
fd = port->fd;
rs = &rig->state;
priv = (struct icom_priv_data*)rs->priv;
freq=state->next_freq;
mode=state->next_mode;