diff --git a/target/h/bLib.h b/target/h/bLib.h index d215c81..1190452 100644 --- a/target/h/bLib.h +++ b/target/h/bLib.h @@ -20,7 +20,7 @@ extern "C" { #endif -int bcmp(char *buf1, char *buf2, size_t nbytes); +int bcmp(const void *buf1, const void *buf2, size_t nbytes); void binvert(char *buf, size_t nbytes); void bswap(char *buf1, char *buf2, size_t nbytes); void swab(char *source, char *destination, size_t nbytes); diff --git a/target/src/bLib.c b/target/src/bLib.c index 27e9099..7129a21 100644 --- a/target/src/bLib.c +++ b/target/src/bLib.c @@ -16,10 +16,10 @@ /* * bcmp - compare one buffer to another */ -int bcmp (char *buf1, char *buf2, size_t nbytes) +int bcmp (const void *buf1, const void *buf2, size_t nbytes) { - unsigned char *p1; - unsigned char *p2; + const unsigned char *p1; + const unsigned char *p2; if (nbytes == 0) { return (0); diff --git a/target/src/taskLib.c b/target/src/taskLib.c index ab74991..2ddef54 100644 --- a/target/src/taskLib.c +++ b/target/src/taskLib.c @@ -96,7 +96,7 @@ void vxWorksTaskInit (void) API_ThreadGetName(task, vxTcb[tid].name); - if (API_ThreadCleanupPush(taskClrTcb, (PVOID)tid)) { + if (API_ThreadCleanupPush(taskClrTcb, (PVOID)(ULONG)tid)) { fprintf(stderr, "vxWorks task cleanup push error: %s\n", strerror(errno)); } } @@ -162,7 +162,7 @@ LW_LIB_HOOK_STATIC void *taskWrapper (WIND_TCB *pTcb) vxRestart[tid] = LW_FALSE; if (pTcb->entry) { - return ((void *)pTcb->entry(pTcb->arg[0], pTcb->arg[1], pTcb->arg[2], + return ((void *)(ULONG)pTcb->entry(pTcb->arg[0], pTcb->arg[1], pTcb->arg[2], pTcb->arg[3], pTcb->arg[4], pTcb->arg[5], pTcb->arg[6], pTcb->arg[7], pTcb->arg[8], pTcb->arg[9])); } else { @@ -234,7 +234,7 @@ STATUS taskInit (WIND_TCB *pTcb, char *name, int priority, } pTcb->id = HANDLE_TO_TID(pTcb->task); - if (API_ThreadCleanupPushEx(pTcb->task, taskClrTcb, (PVOID)pTcb->id)) { + if (API_ThreadCleanupPushEx(pTcb->task, taskClrTcb, (PVOID)(ULONG)pTcb->id)) { API_ThreadDelete(&pTcb->task, LW_NULL); API_EventSetDelete(&pTcb->event); return (ERROR); diff --git a/target/src/wdLib.c b/target/src/wdLib.c index fc5b5dd..8cc351f 100644 --- a/target/src/wdLib.c +++ b/target/src/wdLib.c @@ -83,7 +83,7 @@ STATUS wdStart (WDOG_ID wdId, int delay, FUNCPTR pRoutine, ULONG ulError; ulError = API_TimerStart(wdId, vx2syWdTo(delay), LW_OPTION_MANUAL_RESTART, - (PTIMER_CALLBACK_ROUTINE)pRoutine, (PVOID)parameter); + (PTIMER_CALLBACK_ROUTINE)pRoutine, (PVOID)(ULONG)parameter); if (ulError) { return (ERROR); } else {