From: Frank Mori Hess Date: Sun, 27 Oct 2002 03:30:17 +0000 (+0000) Subject: changed prototype of comedi_map() to prevent bogus compiler warnings X-Git-Tag: r0_7_66~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=93d058a34450fdb7ff80ad2242494daa1b6f2c90;p=comedi.git changed prototype of comedi_map() to prevent bogus compiler warnings --- diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index 0a4fee69..087207e4 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -475,7 +475,7 @@ int comedi_poll(comedi_t *d, unsigned int subdevice) /* WARNING: not portable */ -int comedi_map(comedi_t *d, unsigned int subdevice, void **ptr) +int comedi_map(comedi_t *d, unsigned int subdevice, void *ptr) { comedi_device *dev = (comedi_device *)d; comedi_subdevice *s = dev->subdevices + subdevice; @@ -483,7 +483,10 @@ int comedi_map(comedi_t *d, unsigned int subdevice, void **ptr) if(!s->async) return -EINVAL; - if(ptr)*ptr=s->async->prealloc_buf; + if(ptr) + { + *((void **) ptr) = s->async->prealloc_buf; + } /* XXX no reference counting */ diff --git a/include/linux/comedilib.h b/include/linux/comedilib.h index 24a54658..a4a9ec5e 100644 --- a/include/linux/comedilib.h +++ b/include/linux/comedilib.h @@ -108,7 +108,7 @@ unsigned int comedi_get_buf_head_pos(comedi_t *dev,unsigned int subdevice); int comedi_set_user_int_count(comedi_t *dev,unsigned int subdevice, unsigned int buf_user_count); -int comedi_map(comedi_t *dev, unsigned int subdev, void **ptr); +int comedi_map(comedi_t *dev, unsigned int subdev, void *ptr); int comedi_unmap(comedi_t *dev, unsigned int subdev);