From 8efd951b5083af2bc4dfd8625942d3633bbf6282 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 27 Jul 2007 14:54:26 +0000 Subject: [PATCH] Fixed a few compiler warnings. --- comedi/drivers/cb_pcidda.c | 14 +++++++++----- comedi/drivers/ni_660x.c | 4 ++++ comedi/drivers/ni_mio_common.c | 2 +- comedi/drivers/ni_tio.c | 2 +- comedi/drivers/unioxx5.c | 4 +++- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/comedi/drivers/cb_pcidda.c b/comedi/drivers/cb_pcidda.c index ec3d8118..665e819b 100644 --- a/comedi/drivers/cb_pcidda.c +++ b/comedi/drivers/cb_pcidda.c @@ -240,9 +240,8 @@ static int cb_pcidda_detach(comedi_device *dev); //static int cb_pcidda_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); static int cb_pcidda_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); //static int cb_pcidda_ai_cmd(comedi_device *dev,comedi_subdevice *s); -static int cb_pcidda_ai_cmdtest(comedi_device *dev,comedi_subdevice *s, - comedi_cmd *cmd); -static int cb_pcidda_ns_to_timer(unsigned int *ns,int round); +//static int cb_pcidda_ai_cmdtest(comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd); +//static int cb_pcidda_ns_to_timer(unsigned int *ns,int round); static unsigned int cb_pcidda_serial_in(comedi_device *dev); static void cb_pcidda_serial_out(comedi_device *dev, unsigned int value, unsigned int num_bits); static unsigned int cb_pcidda_read_eeprom(comedi_device *dev, unsigned int address); @@ -424,7 +423,8 @@ static int cb_pcidda_detach(comedi_device *dev) /* * I will program this later... ;-) - * + */ +#if 0 static int cb_pcidda_ai_cmd(comedi_device *dev,comedi_subdevice *s) { printk("cb_pcidda_ai_cmd\n"); @@ -441,8 +441,9 @@ static int cb_pcidda_ai_cmd(comedi_device *dev,comedi_subdevice *s) printk("stop_arg: %d\n", cmd->stop_arg); printk("chanlist_len: %d\n", cmd->chanlist_len); } -*/ +#endif +#if 0 static int cb_pcidda_ai_cmdtest(comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd) { @@ -608,17 +609,20 @@ static int cb_pcidda_ai_cmdtest(comedi_device *dev,comedi_subdevice *s, return 0; } +#endif /* This function doesn't require a particular form, this is just * what happens to be used in some of the drivers. It should * convert ns nanoseconds to a counter value suitable for programming * the device. Also, it should adjust ns so that it cooresponds to * the actual time that the device will use. */ +#if 0 static int cb_pcidda_ns_to_timer(unsigned int *ns,int round) { /* trivial timer */ return *ns; } +#endif static int cb_pcidda_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data) { diff --git a/comedi/drivers/ni_660x.c b/comedi/drivers/ni_660x.c index 25577ddd..ebe5e6a0 100644 --- a/comedi/drivers/ni_660x.c +++ b/comedi/drivers/ni_660x.c @@ -387,9 +387,11 @@ static int ni_660x_GPCT_winsn(comedi_device *dev, lsampl_t * data); // NYI +#if 0 static int ni_660x_GPCT_cmdtest(comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd); static int ni_660x_GPCT_cmd(comedi_device *dev,comedi_subdevice *s); +#endif /* Possible instructions for Digital IO */ static int ni_660x_dio_insn_config(comedi_device *dev, @@ -401,6 +403,7 @@ static int ni_660x_dio_insn_bits(comedi_device *dev, comedi_insn *insn, lsampl_t *data); +#if 0 static int ni_660x_GPCT_cmdtest(comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd) { @@ -413,6 +416,7 @@ static int ni_660x_GPCT_cmd(comedi_device *dev,comedi_subdevice *s) DPRINTK("NI_660X: COMMANDS not implemented yet for GPCT\n"); return -EINVAL; } +#endif static NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg) { diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index d7d4ba64..a3011e74 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -3159,7 +3159,7 @@ static int ni_serial_insn_config(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data) { int err = insn->n; - unsigned char byte_out, byte_in; + unsigned char byte_out, byte_in = 0; if(insn->n!=2)return -EINVAL; diff --git a/comedi/drivers/ni_tio.c b/comedi/drivers/ni_tio.c index 2ec6a341..fd71990d 100644 --- a/comedi/drivers/ni_tio.c +++ b/comedi/drivers/ni_tio.c @@ -2285,7 +2285,7 @@ static void ni_tio_configure_dma(struct ni_gpct *counter, short enable, short re static int ni_tio_input_cmd(struct ni_gpct *counter, comedi_async *async) { struct ni_gpct_device *counter_dev = counter->counter_dev; - comedi_cmd *cmd = &async->cmd; + //comedi_cmd *cmd = &async->cmd; const unsigned command_reg = NITIO_Gi_Command_Reg(counter->counter_index); /* write alloc the entire buffer */ diff --git a/comedi/drivers/unioxx5.c b/comedi/drivers/unioxx5.c index 02db129e..2a366803 100644 --- a/comedi/drivers/unioxx5.c +++ b/comedi/drivers/unioxx5.c @@ -93,7 +93,7 @@ static int __unioxx5_digital_write(unioxx5_subd_priv* usp, lsampl_t* data, int channel, int minor); static int __unioxx5_digital_read(unioxx5_subd_priv* usp, lsampl_t* data, int channel, int minor); -static void __unioxx5_digital_config(unioxx5_subd_priv* usp, int mode); +//static void __unioxx5_digital_config(unioxx5_subd_priv* usp, int mode); static int __unioxx5_analog_write(unioxx5_subd_priv* usp, lsampl_t* data, int channel, int minor); static int __unioxx5_analog_read(unioxx5_subd_priv* usp, lsampl_t* data, @@ -372,6 +372,7 @@ static int __unioxx5_digital_read(unioxx5_subd_priv* usp, lsampl_t* data, return 1; } +#if 0 /* not used? */ static void __unioxx5_digital_config(unioxx5_subd_priv* usp, int mode) { int i, mask; @@ -386,6 +387,7 @@ static void __unioxx5_digital_config(unioxx5_subd_priv* usp, int mode) outb(0, usp->usp_iobase + 0); } +#endif static int __unioxx5_analog_write(unioxx5_subd_priv* usp, lsampl_t* data, int channel, int minor) -- 2.26.2