summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/parser.c b/parser.c
index cd44e0b..9edd7e5 100644
--- a/parser.c
+++ b/parser.c
@@ -1522,7 +1522,7 @@ static int process_float_param (char *parameter, float *value, float min_val, fl
#define NO_ON_OFF 1
static int process_int_param (char *parameter, int *value, int item_count, int *valid_nums, int allow_on_off)
{
- int status, i, min_val, max_val, is_valid;
+ int status, min_val, max_val, is_valid;
status = OK;
is_valid = 0;
@@ -1532,6 +1532,7 @@ static int process_int_param (char *parameter, int *value, int item_count, int *
if (String_is_it_numeric(parameter)) {
*value = atoi(parameter);
+ int i;
for (i = 0; (i < item_count) && (is_valid == 0); i++) {
if (*value == valid_nums[i]) {
is_valid = 1;
@@ -1646,7 +1647,6 @@ static int Go_ampl_26(gchar** response, int channel, char *parameter,char *units
{
float new_ampl;
int status;
- int max_chan;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_amplitude)) {
return status;
@@ -1709,7 +1709,6 @@ static int Go_ampl_26(gchar** response, int channel, char *parameter,char *units
static int Go_pw_36(gchar** response, int channel, char *parameter,char *units,int command_type)
{
float new_pw;
- int check_valid;
int status;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_pw)) {
@@ -2924,8 +2923,7 @@ static int Go_load_68(gchar** response, int channel, char *parameter,char *units
static int Go_meas_ampl_69(gchar** response, int channel, char *parameter,char *units,int command_type)
{
- int i, status;
- float meas_ampl;
+ int status;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_amplitude)) {
return status;
@@ -3221,7 +3219,6 @@ static int Go_calib_pw_77(gchar** response, int channel, char *parameter,char *u
static int Go_routeclose_78(gchar** response, int channel, char *parameter,char *units,int command_type)
{
- char channels_selected[max_channels+1];
int error_num;
int temp1, temp2, status;
@@ -3273,17 +3270,13 @@ static int Parse_chan_list(int channel,char *parameter,int *primary_selected, in
// FIXME - update with g_str functions
int i;
int n;
- int m;
int pointer;
- int count;
int has_module_name;
int *value_pointer;
#define PARSE_MAX_STRING 20
char temp[PARSE_MAX_STRING+1];
- count=0;
-
if (response) {
response[0]=0;
}
@@ -3642,7 +3635,6 @@ static int Go_puls_count_88(gchar** response, int channel, char *parameter,char
static int Go_puls_sep_89(gchar** response, int channel, char *parameter,char *units,int command_type)
{
float new_pw;
- int check_valid;
int status;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_Burst_Time)) {
@@ -3728,7 +3720,6 @@ static int Go_eprom_sus_93(gchar** response, int channel, char *parameter,int co
static int Go_rise_time_94(gchar** response, int channel, char *parameter,char *units,int command_type)
{
float new_rise_time;
- int check_valid;
int status;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_rise_time)) {
@@ -3812,7 +3803,6 @@ static int Go_sav_54(gchar** response, int channel, char *parameter,char *units,
static int Go_soft_current_limit_96(gchar** response, int channel, char *parameter,char *units,int command_type)
{
float new_soft_current_limit;
- int check_valid;
int status;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_current_limit)) {
@@ -3858,7 +3848,6 @@ static int Go_soft_current_limit_96(gchar** response, int channel, char *paramet
static int Go_curr_slew_98(gchar** response, int channel, char *parameter,char *units,int command_type)
{
float new_slew;
- int check_valid;
int status;
if (status = check_channel_ok (channel, globals.Flash.channels, globals.Flash.ChanKey_slew)) {
@@ -3903,7 +3892,6 @@ static int Go_avrq_ampl(gchar** response, int channel, char *parameter,char *uni
{
float new_ampl;
int status;
- int max_chan;
float min_val,max_val,cur_val;
new_ampl=1.0;