On 04/27/2017 07:38 PM, Jeong Han Lee wrote:
> Hi,
>
> I did modify the records, which I mentioned in tech-talks as below:
> http://www.aps.anl.gov/epics/tech-talk/2017/msg00690.php
>
> Main focus are the following three items
> 1. recGblResetAlarms returns unsigned short / epicsUInt16
> 2. recGblCheckDeadband uses "unsigned (int) / epicsUInt32
> 3. db_post_events uses "unsigned int / epicsUInt32
>
> So, I decided to minimize any changes on the monitor functions.
>
> Please let me know what you think.
A couple of points.
* The recGblCheckDeadband() function accepts monitor mask as
(unsigned*), which happens to be the same as (epicsUInt32*). In my mind
though this should be explicit and the 'monitor_mask' local in
aiRecord.c should be 'unsigned'.
* Changing a local loop index from 'int i' to 'epicsInt32 i' doesn't
seem to me so useful. Better to check if it can be made unsigned or size_t.
* In permissiveRecord.c you change some locals from 'unsigned short' to
epicsUInt16 which is fine, but you also initialize them to zero when
they were previously not initialized. In this case it's a no-op as the
zeros are immediately replaced. In general I think it's better to leave
locals uninitialized unless the value will be used.
gcc at least will in many cases warn about possible unconditional use of
uninitialized locals. I like to give the compiler an opportunity to
tell me when I'm making a mistake :)
Also, I'd rather not see the type repeated four times. So better to
make this:
> epicsUInt16 val = prec->val,
> oval = prec->oval,
> wflg = prec->wflg;
> oflg = prec->oflg;
- Replies:
- Re: Patch file for Records which use consistent epics data types Jeong Han Lee
- References:
- Patch file for Records which use consistent epics data types Jeong Han Lee
- Navigate by Date:
- Prev:
Re: Patch file for Records which use consistent epics data types Michael Davidsaver
- Next:
Re: Patch file for Records which use consistent epics data types Jeong Han Lee
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Patch file for Records which use consistent epics data types Michael Davidsaver
- Next:
Re: Patch file for Records which use consistent epics data types Jeong Han Lee
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|