From 797df775d03944a97f9cdc37a41c78056b6adb47 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 21 May 2008 17:46:02 +0000 Subject: [PATCH] void *asp => struct *. Removed some casts and cleaned up 'type-punned pointer' warnings. --- src/as/asDbLib.c | 11 ++++++----- src/db/dbCommon.dbd | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/as/asDbLib.c b/src/as/asDbLib.c index 6f409f17c..a838444c9 100644 --- a/src/as/asDbLib.c +++ b/src/as/asDbLib.c @@ -55,7 +55,7 @@ static long asDbAddRecords(void) while(!status) { precord = pdbentry->precnode->precord; if(!precord->asp) { - status = asAddMember((ASMEMBERPVT *)&precord->asp,precord->asg); + status = asAddMember(&precord->asp, precord->asg); if(status) errMessage(status,"asDbAddRecords:asAddMember"); asPutMemberPvt(precord->asp,precord); } @@ -101,7 +101,7 @@ int epicsShareAPI asSetSubstitutions(const char *substitutions) static void asSpcAsCallback(struct dbCommon *precord) { - asChangeGroup((ASMEMBERPVT *)&precord->asp,precord->asg); + asChangeGroup(&precord->asp, precord->asg); } static void asInitCommonOnce(void *arg) @@ -149,8 +149,9 @@ int epicsShareAPI asInit(void) return(asInitCommon()); } -static void wdCallback(ASDBCALLBACK *pcallback) +static void wdCallback(void *arg) { + ASDBCALLBACK *pcallback = (ASDBCALLBACK *)arg; pcallback->status = S_asLib_InitFailed; callbackRequest(&pcallback->callback); } @@ -159,7 +160,7 @@ static void asInitTask(ASDBCALLBACK *pcallback) { long status; - taskwdInsert(epicsThreadGetIdSelf(),(TASKWDFUNCPRR)wdCallback,(void *)pcallback); + taskwdInsert(epicsThreadGetIdSelf(), wdCallback, (void *)pcallback); status = asInitCommon(); taskwdRemove(epicsThreadGetIdSelf()); asInitTheadId = 0; @@ -247,7 +248,7 @@ int epicsShareAPI astac(const char *pname,const char *user,const char *location) plocation = asCalloc(1,strlen(location)+1); strcpy(plocation,location); - status = asAddClient(pasclientpvt,(ASMEMBERPVT)precord->asp, + status = asAddClient(pasclientpvt,precord->asp, (int)pflddes->as_level,puser,plocation); if(status) { errMessage(status,"asAddClient error"); diff --git a/src/db/dbCommon.dbd b/src/db/dbCommon.dbd index 737c562d3..414cbbcc9 100644 --- a/src/db/dbCommon.dbd +++ b/src/db/dbCommon.dbd @@ -167,7 +167,7 @@ prompt("Access Security Pvt") special(SPC_NOMOD) interest(4) - extra("void *asp") + extra("struct asgMember *asp") } field(PPN,DBF_NOACCESS) { prompt("addr of PUTNOTIFY")