summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-19 14:35:08 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-19 14:35:08 -0400
commit3ebde173c2976a6d83f94bd4a1b5738fa52dd685 (patch)
tree3103c59543b4e0f4e91ca81659ca082df64378ba
parentf98d4cfb2cff6df80ecd846f11781568d348fc19 (diff)
fix return-value warnings
-rw-r--r--device-functions.c18
-rw-r--r--device-functions.h6
-rw-r--r--menus.c4
-rw-r--r--parser.c3
4 files changed, 20 insertions, 11 deletions
diff --git a/device-functions.c b/device-functions.c
index df5b344..b52a6d5 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -14,6 +14,11 @@
#include <security/pam_appl.h>
#include <security/pam_misc.h>
+
+static void start_gate_override ();
+static void stop_gate_override ();
+
+
void idn_string(gchar** response)
{
*response = g_strdup_printf ("AVTECH ELECTROSYSTEMS,%s,SN:%s,v%s",
@@ -133,7 +138,7 @@ void Main_Rst (void)
}
-int set_dac(int dac, int word)
+void set_dac(int dac, int word)
{
/* allows dacs to be disabled (using dac=-1, for example) */
if ((dac >= 0) && (dac < 8)) {
@@ -771,7 +776,7 @@ void Ctrl_PRF_Limiter(int enable)
}
-int Set_Mux(int channel)
+void Set_Mux(int channel)
{
int mux_out;
@@ -1080,7 +1085,7 @@ int Set_Gate_Level(int channel,int mode)
}
-int start_gate_override ()
+static void start_gate_override ()
{
/* just set gate bit high, if not already high */
int i;
@@ -1091,7 +1096,7 @@ int start_gate_override ()
}
-int stop_gate_override ()
+static void stop_gate_override ()
{
/* release gate (if not in hold mode) */
int i;
@@ -4030,7 +4035,7 @@ int go_cal(CalStruct *caldata)
}
-int cal_string(char *parameter, CalStruct *caldata)
+void cal_string(char *parameter, CalStruct *caldata)
{
char string[max_output_length];
@@ -4128,9 +4133,12 @@ int do_full_self_cal(CalStruct *caldata)
if (caldata->total_errors) {
return SelfCalError;
+ } else {
+ return OK;
}
}
+
int I2C_Self_Cal(int channel, int meas_mode, float *meas, float target_time)
{
#define MAX_TRIES 35
diff --git a/device-functions.h b/device-functions.h
index 7076035..dc14abd 100644
--- a/device-functions.h
+++ b/device-functions.h
@@ -10,7 +10,7 @@ void idn_string(gchar** response);
int Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq);
void Main_Rst(void);
-int set_dac(int dac, int word);
+void set_dac(int dac, int word);
int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int word_override,int range_override,
int switch_range_only,int channel,float new_ampl,int called_from_set_pw);
int Set_Pw(int check_possible_only,int word_override,int range_override,int channel,float set_pw,int called_from_set_ampl);
@@ -18,7 +18,7 @@ int Set_Offset(int check_possible_only,int override_on,int word_override,int ran
int Set_Delay(int check_possible_only,int word_override,int range_override,int channel,float set_delay);
int Set_Double(int channel,int new_setting);
void Ctrl_PRF_Limiter(int enable);
-int Set_Mux(int channel);
+void Set_Mux(int channel);
int Set_Func(int channel,int mode);
int Set_Pol(int channel,int mode);
int Set_Hold(int channel,int mode);
@@ -61,7 +61,7 @@ int Set_avrq_res(int check_possible_only,int word_override,int range_override,in
int Set_slew(int check_possible_only,int word_override,int range_override,int channel,float new_burst_time);
int Set_avrq_ampl(int check_possible_only,int word_override,int range_override,int channel,float new_avrq_ampl);
int go_cal(CalStruct *caldata);
-int cal_string(char *parameter, CalStruct *caldata);
+void cal_string(char *parameter, CalStruct *caldata);
int self_cal();
int do_full_self_cal(CalStruct *caldata);
int I2C_Self_Cal(int channel, int meas_mode, float *meas, float target_time);
diff --git a/menus.c b/menus.c
index 91657d8..767da21 100644
--- a/menus.c
+++ b/menus.c
@@ -198,7 +198,7 @@ float Submenu_Value; /* actual value of the shown parameter (like frequency)
int Submenu_extra_fine; /* is the extra-fine mode on? */
-static int update_remote_mode ();
+static void update_remote_mode ();
static int Menu_Is_Item_Visible(int LCD_entry);
static void Menu_Move_Pointer(int move_amount);
static void Display_Number_on_LCD(int Is_Item_Visible,int LCD_row,int LCD_col,char *start_string,int Show_What, int significant_digits, int width_of_column);
@@ -221,7 +221,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower
#define RM_TERM 4
-static int update_remote_mode ()
+static void update_remote_mode ()
{
int is_remote, is_lockout;
GPIB_check_remote_status (&is_remote, &is_lockout);
diff --git a/parser.c b/parser.c
index c2ba8d3..3a94af8 100644
--- a/parser.c
+++ b/parser.c
@@ -2335,7 +2335,8 @@ static int Go_delay_test58(gchar** response, int channel, char *parameter,char *
return status;
}
globals.ChannelState[channel].test_delay_mode=on_off;
- return Set_Mux(channel);
+ Set_Mux(channel);
+ return OK;
break;
default: