From: Ian Abbott Date: Wed, 21 Jun 2006 16:09:07 +0000 (+0000) Subject: Fix gcc-4.1 warnings (uninitialized variables). X-Git-Tag: r0_7_71~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0155924fa57ee6e539303e42180ca5be2b45a1a2;p=comedi.git Fix gcc-4.1 warnings (uninitialized variables). --- diff --git a/comedi/drivers/dt9812.c b/comedi/drivers/dt9812.c index 1f5862cb..4fc973b7 100644 --- a/comedi/drivers/dt9812.c +++ b/comedi/drivers/dt9812.c @@ -724,7 +724,7 @@ static int dt9812_di_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn, lsampl_t *data) { int n; - u8 bits; + u8 bits = 0; dt9812_digital_in(devpriv->slot, &bits); for(n = 0 ; n < insn->n ; n++){ @@ -737,7 +737,7 @@ static int dt9812_do_winsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn, lsampl_t *data) { int n; - u8 bits; + u8 bits = 0; dt9812_digital_out_shadow(devpriv->slot, &bits); for(n = 0 ; n < insn->n ; n++){ @@ -759,7 +759,7 @@ static int dt9812_ai_rinsn(comedi_device *dev, comedi_subdevice *s, int n; for(n = 0 ; n < insn->n ; n++){ - u16 value; + u16 value = 0; dt9812_analog_in(devpriv->slot, insn->chanspec, &value, DT9812_GAIN_1); data[n] = value; @@ -774,7 +774,7 @@ static int dt9812_ao_rinsn(comedi_device *dev, comedi_subdevice *s, int n; for(n = 0 ; n < insn->n ; n++){ - u16 value; + u16 value = 0; dt9812_analog_out_shadow(devpriv->slot, insn->chanspec, &value); data[n] = value; diff --git a/comedi/drivers/pcl812.c b/comedi/drivers/pcl812.c index 3877404b..a463f1f0 100644 --- a/comedi/drivers/pcl812.c +++ b/comedi/drivers/pcl812.c @@ -723,7 +723,7 @@ static int pcl812_ai_cmdtest(comedi_device *dev,comedi_subdevice *s,comedi_cmd * */ static int pcl812_ai_cmd(comedi_device *dev,comedi_subdevice *s) { - unsigned int divisor1, divisor2, i, dma_flags, bytes; + unsigned int divisor1=0, divisor2=0, i, dma_flags, bytes; comedi_cmd *cmd=&s->async->cmd; #ifdef PCL812_EXTDEBUG